[systemd] Updating services
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
alias v="vim $*"
|
alias v="vim $*"
|
||||||
alias c="clear"
|
alias c="clear"
|
||||||
alias dc="docker-compose $*"
|
alias dc="podman-compose $*"
|
||||||
alias dj="poetry run python manage.py $*"
|
alias dj="poetry run python manage.py $*"
|
||||||
alias sysu="systemctl --user $*"
|
alias sysu="systemctl --user $*"
|
||||||
alias fsync="find . -type f -name '*.sync-conflict*'"
|
alias fsync="find . -type f -name '*.sync-conflict*'"
|
||||||
@ -17,3 +17,5 @@ alias chglg="git add ./changelog/ && git commit -m 'Add changelog' && git push"
|
|||||||
alias slip="sli dev changelog"
|
alias slip="sli dev changelog"
|
||||||
alias vdeploy="ssh life.unbl.ink \"rm -rf /root/vrobbler-venv/lib/python3.11/site-packages/vrobbler-0.15.4.dist-info/ && pip install git+https://code.unbl.ink/secstate/vrobbler.git@develop && systemctl restart vrobbler\""
|
alias vdeploy="ssh life.unbl.ink \"rm -rf /root/vrobbler-venv/lib/python3.11/site-packages/vrobbler-0.15.4.dist-info/ && pip install git+https://code.unbl.ink/secstate/vrobbler.git@develop && systemctl restart vrobbler\""
|
||||||
alias vsh="ssh life.unbl.ink vrobbler shell_plus"
|
alias vsh="ssh life.unbl.ink vrobbler shell_plus"
|
||||||
|
alias docker="podman $*"
|
||||||
|
alias docker-compose="podman-compose $*"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
BASEDIR="/media/photos/misc/nytimes"
|
BASEDIR="/var/photos/misc/nytimes"
|
||||||
DATE=$(date +"%Y-%m-%d")
|
DATE=$(date +"%Y-%m-%d")
|
||||||
TMPFILE=/tmp/nyt.pdf
|
TMPFILE=/tmp/nyt.pdf
|
||||||
OUTFILE=$BASEDIR/$DATE.jpg
|
OUTFILE=$BASEDIR/$DATE.jpg
|
||||||
|
|||||||
@ -60,9 +60,9 @@ if [ "$1" = "orchard" ]; then
|
|||||||
host="mobian.local"
|
host="mobian.local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ROOT="media/photos/misc/webcams"
|
ROOT="/var/photos/misc/webcams"
|
||||||
mkdir -p /$ROOT/$1/$(date +%Y)/$(date +%m)/$(date +%d)/
|
|
||||||
filepath="$1/$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%Y%m%d%H%M%S).jpg"
|
filepath="$1/$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%Y%m%d%H%M%S).jpg"
|
||||||
|
mkdir -p /$ROOT/$1/$(date +%Y)/$(date +%m)/$(date +%d)/
|
||||||
curl $host:$port/snapshot -o /$ROOT/$filepath
|
curl $host:$port/snapshot -o /$ROOT/$filepath
|
||||||
url="https://files.lab.unbl.ink/webcams/$filepath"
|
url="https://files.lab.unbl.ink/webcams/$filepath"
|
||||||
curl -H prio:low -H "click:$url" -d "Captured photo from $1 successfully" https://ntfy.unbl.ink/webcams
|
curl -H prio:low -H "click:$url" -d "Captured photo from $1 successfully" https://ntfy.unbl.ink/webcams
|
||||||
|
|||||||
12
bin/.bin/webcam-capture-all
Executable file
12
bin/.bin/webcam-capture-all
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
/home/powellc/.bin/webcam-capture frontyard
|
||||||
|
/home/powellc/.bin/webcam-capture basement_table
|
||||||
|
/home/powellc/.bin/webcam-capture mailbox
|
||||||
|
/home/powellc/.bin/webcam-capture basement_extension
|
||||||
|
/home/powellc/.bin/webcam-capture backyard_low
|
||||||
|
/home/powellc/.bin/webcam-capture basement_cape
|
||||||
|
/home/powellc/.bin/webcam-capture house
|
||||||
|
/home/powellc/.bin/webcam-capture backyard
|
||||||
|
/home/powellc/.bin/webcam-capture bulkhead
|
||||||
|
/home/powellc/.bin/webcam-capture orchard
|
||||||
7
systemd/.config/systemd/user/cam-capture.service
Normal file
7
systemd/.config/systemd/user/cam-capture.service
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description="Download latest camera shots"
|
||||||
|
Requires=cam-capture.timer
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/home/powellc/.bin/webcam-capture-all
|
||||||
10
systemd/.config/systemd/user/cam-capture.timer
Normal file
10
systemd/.config/systemd/user/cam-capture.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description="Timer for the cam capture"
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
Unit=cam-capture.service
|
||||||
|
OnBootSec=10s
|
||||||
|
OnCalendar=*:0/2
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@ -4,4 +4,4 @@ Requires=nyt-downloader.timer
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/local/bin/nyt
|
ExecStart=/home/powellc/.bin/nyt
|
||||||
|
|||||||
Reference in New Issue
Block a user