6 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
8 # setup things which involve being the primary host or not
12 sed -ri "s/MAIL_HOST=.*/MAIL_HOST=$new_host/" /a
/bin
/bash_unpublished
/source-semi-priv
13 source /a
/bin
/bash_unpublished
/source-semi-priv
16 if [[ $HOSTNAME == $MAIL_HOST ]]; then
17 DISPLAY
=:0 arbtt-capture
--sample-rate=10 &
18 sudo systemctl start rss2email.timer
19 sudo systemctl
enable rss2email.timer
22 for ((i
=0; i
<10; i
++)); do
23 killall arbtt-capture ||
break
25 if [[ $i == 9 ]]; then
28 sudo systemctl stop rss2email.timer
29 sudo systemctl stop rss2email.service
30 sudo systemctl disable rss2email.timer