diff --git a/bash/.aliases b/bash/.aliases index b7e239a..d925539 100644 --- a/bash/.aliases +++ b/bash/.aliases @@ -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 $*" diff --git a/bin/.bin/nyt b/bin/.bin/nyt index 37cc375..174bd09 100755 --- a/bin/.bin/nyt +++ b/bin/.bin/nyt @@ -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 diff --git a/bin/.bin/webcam-capture b/bin/.bin/webcam-capture index cab6777..903286c 100755 --- a/bin/.bin/webcam-capture +++ b/bin/.bin/webcam-capture @@ -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 diff --git a/bin/.bin/webcam-capture-all b/bin/.bin/webcam-capture-all new file mode 100755 index 0000000..68088b3 --- /dev/null +++ b/bin/.bin/webcam-capture-all @@ -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 diff --git a/systemd/.config/systemd/user/cam-capture.service b/systemd/.config/systemd/user/cam-capture.service new file mode 100644 index 0000000..c10d949 --- /dev/null +++ b/systemd/.config/systemd/user/cam-capture.service @@ -0,0 +1,7 @@ +[Unit] +Description="Download latest camera shots" +Requires=cam-capture.timer + +[Service] +Type=simple +ExecStart=/home/powellc/.bin/webcam-capture-all diff --git a/systemd/.config/systemd/user/cam-capture.timer b/systemd/.config/systemd/user/cam-capture.timer new file mode 100644 index 0000000..69632a9 --- /dev/null +++ b/systemd/.config/systemd/user/cam-capture.timer @@ -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 diff --git a/systemd/.config/systemd/user/nyt-downloader.service b/systemd/.config/systemd/user/nyt-downloader.service index cdd2323..b148488 100644 --- a/systemd/.config/systemd/user/nyt-downloader.service +++ b/systemd/.config/systemd/user/nyt-downloader.service @@ -4,4 +4,4 @@ Requires=nyt-downloader.timer [Service] Type=simple -ExecStart=/usr/local/bin/nyt +ExecStart=/home/powellc/.bin/nyt