various fixes
authorIan Kelling <ian@iankelling.org>
Sun, 5 Feb 2017 06:02:47 +0000 (22:02 -0800)
committerIan Kelling <ian@iankelling.org>
Sun, 5 Feb 2017 06:02:47 +0000 (22:02 -0800)
distro-end
mail-cert-cron
rootsshsync

index a0a6608f667696fe9619943f1b1e4cf7eb039d44..95a6e2ddd94de0c1b31b8b2cd0dd0538e0868e03 100755 (executable)
@@ -273,6 +273,7 @@ EOF
         ser enable vpnmail.service
         acme-tiny-wrapper mail.iankelling.org
         sgo openvpn
+        tu /etc/hosts <<<"mail.iankelling.org 10.8.0.4"
 
 
         echo "$0: $(date): ending now)"
index fd87130b2cc5652105c6f28a25b23732f6241bd0..fad821467f545f68a5abc7bfede5cec53f245937 100644 (file)
@@ -19,7 +19,7 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 source /a/bin/bash_unpublished/source-semi-priv
 if [[ $HOSTNAME == $MAIL_HOST ]]; then
     local_mx=mail.iankelling.org
-    rsync_common="s rsync -og --chown=root:Debian-exim --chmod=640 root@li:/p/c/machine_specific/li/webservercerts/$local_mx-"
+    rsync_common="s 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
index ebfc80216b6e293e9162e5c2f3ec825048f166ad..d3e860b30c0109c38a32f78f0d2a32641d0fa921 100755 (executable)
@@ -19,13 +19,12 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 [[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@"
 
 if test -e /q/root/.ssh; then
-    export LNF_VERBOSE=true
-    if ! /a/exe/lnf /q/root/.ssh /root > /tmp/lnf_log; then
-        cat /tmp/lnf_log
-    fi
+    /a/exe/lnf /q/root/.ssh /root
 else
     mkdir -p /root/.ssh
     chmod 700 /root/.ssh
 fi
-cp -rL $(eval echo ~${SUDO_USER:-$USER})/.ssh/* /root/.ssh
+# -t times, so it won't rewrite the file every time,
+# -L resolve links
+rsync -rtL $(eval echo ~${SUDO_USER:-$USER})/.ssh /root
 chown -R root:root /root/.ssh