X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=primary-setup;h=d6c0ed9ec4cf8ea43d64d2312fe0f50a46b23532;hp=30c4222a7bc9c3cdfb6885546a147c4b8225438f;hb=343a048be4b32d18540c6531048d2b9a006774ae;hpb=50e3ebaf4941651899a3b52b5245052c3f4ed725 diff --git a/primary-setup b/primary-setup index 30c4222..d6c0ed9 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,7 +18,7 @@ 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