[systemd] Updating services

This commit is contained in:
2025-02-07 13:44:14 -05:00
parent a25d8e4530
commit 1015d4b9c3
7 changed files with 36 additions and 5 deletions

View File

@ -1,6 +1,6 @@
alias v="vim $*"
alias c="clear"
alias dc="docker-compose $*"
alias dc="podman-compose $*"
alias dj="poetry run python manage.py $*"
alias sysu="systemctl --user $*"
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 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 docker="podman $*"
alias docker-compose="podman-compose $*"

View File

@ -1,5 +1,5 @@
#!/bin/bash
BASEDIR="/media/photos/misc/nytimes"
BASEDIR="/var/photos/misc/nytimes"
DATE=$(date +"%Y-%m-%d")
TMPFILE=/tmp/nyt.pdf
OUTFILE=$BASEDIR/$DATE.jpg

View File

@ -60,9 +60,9 @@ if [ "$1" = "orchard" ]; then
host="mobian.local"
fi
ROOT="media/photos/misc/webcams"
mkdir -p /$ROOT/$1/$(date +%Y)/$(date +%m)/$(date +%d)/
ROOT="/var/photos/misc/webcams"
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
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

12
bin/.bin/webcam-capture-all Executable file
View 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

View 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

View 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

View File

@ -4,4 +4,4 @@ Requires=nyt-downloader.timer
[Service]
Type=simple
ExecStart=/usr/local/bin/nyt
ExecStart=/home/powellc/.bin/nyt