add rss2email, lump ff unstable upgrades with the rest
[distro-setup] / mail-cert-cron
index fad821467f545f68a5abc7bfede5cec53f245937..64b22ebe9a84c4af4c4a0c76258ce1d24a6f1edb 100644 (file)
 set -eE -o pipefail
 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
+[[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@"
+
 source /a/bin/bash_unpublished/source-semi-priv
 if [[ $HOSTNAME == $MAIL_HOST ]]; then
     local_mx=mail.iankelling.org
-    rsync_common="rsync -ogt --chown=root:Debian-exim --chmod=640 root@li:/p/c/machine_specific/li/webservercerts/$local_mx-"
+    rsync_common="rsync -ogt --chown=root:Debian-exim --chmod=640 root@li:/p/c/machine_specific/li/webservercerts/$local_mx-"
     ${rsync_common}chained.pem /etc/exim4/exim.crt
     ${rsync_common}domain.key /etc/exim4/exim.key
 fi