mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 11:04:41 +02:00
[systemd] update webcam-script
This commit is contained in:
parent
dbd6704926
commit
54c7c6ac00
6 changed files with 17 additions and 20 deletions
4
systemd/webcam-install.sh
Executable file
4
systemd/webcam-install.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
cp webcam.service webcam.timer ~/.config/systemd/user/
|
||||
systemctl enable webcam.timer --user
|
6
systemd/webcam.service
Normal file
6
systemd/webcam.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Webcam script
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/felix/.dotfiles/systemd/webcam.sh
|
||||
Type=oneshot
|
8
systemd/webcam.sh
Executable file
8
systemd/webcam.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
now=$(date +"%Y_%m_%d_%H_%M_%S")
|
||||
path="$HOME/Pictures/hour-pics"
|
||||
size="1280x720"
|
||||
|
||||
mkdir -p "$path"
|
||||
streamer -q -f jpeg -s $size -o "$path"/"$now".jpeg -r 1
|
||||
exit $?
|
8
systemd/webcam.timer
Normal file
8
systemd/webcam.timer
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Unit]
|
||||
Description=1 hour webcam-timer
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*:00
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Add table
Add a link
Reference in a new issue