I hereby claim:
- I am snevas on github.
- I am snevas (https://keybase.io/snevas) on keybase.
- I have a public key ASAJjxPvOTvXnddwrUQ7Tym57EEwIIqr0QqlfSZef3FDwQo
To claim this, I am signing this object:
[Unit] | |
Description=LEDs on doorbell ring | |
After=unifi-protect.service | |
#Install tmux and multitail from apt | |
#Replace sleep with aplay on UDM if you want it to play sound | |
[Service] | |
ExecStart=tmux new-session -d -s multitail multitail -D -ex "EventRingButtonPressed" "uled-ctrl blink 500 008000 FF0000 && sleep 10 && uled-ctrl fw idle" -iw "/ssd1/.data/unifi-protect/logs/cameras/*.log" 30 | |
ExecStop=tmux kill-session -t multitail | |
User=root |
Made into systemd service with https://northernlightlabs.se/2014-07-05/systemd-status-mail-on-unit-failure.html and added: | |
ExecStartPre=-/usr/bin/docker stop unifi-cam1 | |
ExecStop=/usr/bin/docker stop unifi-cam1 | |
ExecStopPost=/bin/sleep 20 | |
Cleanup with cron: | |
ls -1t /path/cam1-*.mp4 | tail -n +672 | xargs rm -f | |
#!/bin/bash |
# apt install db5.3-util whois | |
# mkdir /var/local/screenpass | |
# chown root:shadow /var/local/screenpass | |
# chmod 2750 /var/local/screenpass | |
$ mkpasswd -m des | |
# db5.3_load -h /var/local/screenpass -t hash -T passwd.db | |
[user] | |
[despass] | |
^D | |
# cp /etc/pam.d/gdm-password /etc/pam.d/_gdm-password |
#!/bin/bash | |
# Cron every hour | |
backupname=full | |
timeago='1 day ago' | |
echo "Starting backup checks at $(date)" | |
# Check if not on battery | |
if [ $(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state | awk '{print $2}') != "discharging" ] ; then | |
echo "[1/2] Not discharging, continuing" | |
datetime=$(veeamconfig session list | grep Success | tail -1 | awk '{print $7 "T" $8}') |
I hereby claim:
To claim this, I am signing this object: