X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=primary-setup;h=09ae728bc6c02c13a7b61fbab1951da362023154;hb=f5bedaabc8ab8e0fa29238b70ab66bd7d37095d1;hp=30c4222a7bc9c3cdfb6885546a147c4b8225438f;hpb=1059b8ac11f567b9a8eec1e34a7ab6e791721dca;p=distro-setup diff --git a/primary-setup b/primary-setup index 30c4222..09ae728 100755 --- a/primary-setup +++ b/primary-setup @@ -7,7 +7,7 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR -if [[ ! $SUDO_USER || $EUID == 0 ]]; then +if [[ $EUID == 0 && ! $SUDO_USER ]]; then echo "$0: error: requires running as nonroot or sudo" exit 1 fi @@ -18,11 +18,13 @@ if [[ $1 ]]; then source /a/bin/bash_unpublished/source-state fi -if [[ $HOSTNAME == $MAIL_HOST ]]; then +if [[ $HOSTNAME == "$MAIL_HOST" ]]; then # arbtt disabled for now #DISPLAY=:0 arbtt-capture --sample-rate=10 & sudo systemctl start rss2email.timer sudo systemctl enable rss2email.timer + sudo systemctl start btrbk.timer + sudo systemctl enable btrbk.timer else sudo systemctl stop rss2email.timer