Hero Image

Getting your daemon output to signal

I had a devil of a time getting SMTP to work like it used to. @#$@#$%#$^ at&t blocks outbound port 25 so we have to get really clever. The nice part of this is that this enables me receive daemon updates on my watch, all through the signal app. I managed to find an easier way (compiling java is a total pita!):

Install the very nice packages from this link just follow the directions on their website. I didn't bother installing it as a service,

I just use the 'root' user and register with this command: signal-cli link -n "device-name-test" | tee >(xargs -L 1 qrencode -t utf8)We assume that you have xargs and qrencode. installed. Scan with your phone and add to your system.

To have a daemon send notifications, just use the following command (here for rsync jobs)

You can do more advanced things or use the docker way if you want to. This way WILL NOT work for aarch64 but works fine on x86 boxes.

#!/usr/bin/env bash
source /etc/bash.bashrc
/usr/bin/rsync -chai --stats myuser@myv.me:/vms /data | egrep -v "sending incremental file list" | egrep -v "^\." | /usr/bin/signal-cli send --message-from-stdin <signalphonenumber> 2>&1