From: Ian Kelling Date: Sun, 5 Feb 2017 06:02:47 +0000 (-0800) Subject: various fixes X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=e87b740855adc5dc38ca375401068f5eaaab3fe9 various fixes --- diff --git a/distro-end b/distro-end index a0a6608..95a6e2d 100755 --- a/distro-end +++ b/distro-end @@ -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)" diff --git a/mail-cert-cron b/mail-cert-cron index fd87130..fad8214 100644 --- a/mail-cert-cron +++ b/mail-cert-cron @@ -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 diff --git a/rootsshsync b/rootsshsync index ebfc802..d3e860b 100755 --- a/rootsshsync +++ b/rootsshsync @@ -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