generated from pavel.muhortov/template-bash
2.7 KiB
2.7 KiB
cctv-scheduler
PTZ IP-Camera management
sequence.sh
Description:
Hikvision PTZ-camera sequence.
Additionally:
- getting temperature from ds-18b20 over SSH,
- saving pictures to FTP.
- This is only a local "proof of conept" for testing and debugging.
Dependencies:
- bash (tested version 5.1.4 on Debian GNU/Linux 11)
- curl (tested version 7.74 on Debian GNU/Linux 11)
- sshpass (tested version 1.09 on Debian GNU/Linux 11)
POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
---|---|---|---|
1 | [qn] | execution without pauses | |
2 | [/path/to/conf] | path to config | ./sequence.conf |
Example usage in terminal with bash:
bash ./sequence.sh - ./sequence.conf
Example usage with cron:
# crontab -e
0 * * * * bash /home/user/cctv-scheduler/sequence.sh qn
converter.sh
Description:
JPEG to MP4 converter.
Dependencies:
- bash (tested version 5.1.4 on Debian GNU/Linux 11)
- ffmpeg (tested version 4.3.4 on Debian GNU/Linux 11)
- filesystem organization:
# filesystem organisation example /root/ /2022/ /12/ /52/ /31/ /image-01_2022.12.31_time.jpeg /image-02_2022.12.31_time.jpeg /2023/ /01/ /01/ /02/ /image-01_2023.01.02_time.jpeg /image-02_2023.01.02_time.jpeg /03/ /image-01_2023.01.03_time.jpeg /image-02_2023.01.03_time.jpeg
POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
---|---|---|---|
1 | [qn] | execution without pauses | |
2 | [/path/to/conf] | path to config | ./converter.conf |
3 | [-d|-w|-m|-y] | periods: '' - today | '-d' - yesterday | '-w' - last week | '-m' - last month | '-y' - last year |
Example usage in terminal with bash for today's MP4 making:
bash ./converter.sh - ./converter.conf
Example usage with cron:
# crontab -e
1 0 * * * bash /home/user/cctv-scheduler/converter.sh qn - -d
7 0 * * 1 bash /home/user/cctv-scheduler/converter.sh qn - -w
30 0 1 * * bash /home/user/cctv-scheduler/converter.sh qn - -m
36 0 1 1 * bash /home/user/cctv-scheduler/converter.sh qn - -y