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)"
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
[[ $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