X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=4a7ce3744a9cd3e20f81aa087fedf4bef26e927a;hb=d6def754cd241538c61456536b52ee51cbd85b42;hp=08e74fc443f771edcbd625547f9eb796b9c08b70;hpb=f46ee5570766081a5a73ce0d2132c8a06ee966fb;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index 08e74fc..4a7ce37 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -196,7 +196,7 @@ e "On $new_host: umounting /m and /o, checking emacs" cat <<'EOF' set -eE if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then - bufs="$(sudo -u iank emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" + bufs="$(sudo -u iank env XDG_RUNTIME_DIR=/run/user/1000 emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" if [[ $bufs ]]; then echo "error: on $HOSTNAME, unsaved emacs files: $bufs" >&2 exit 1 @@ -217,7 +217,7 @@ EOF $old_shell bash -s <<'EOF' if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then - bufs="$(sudo -u iank emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" + bufs="$(sudo -u iank env XDG_RUNTIME_DIR=/run/user/1000 emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" if [[ $bufs ]]; then echo "error: on $HOSTNAME, unsaved emacs files: $bufs" >&2 exit 1 @@ -253,7 +253,7 @@ if ! $mail_only; then fi if $host2_only; then - if [[ $old_hostname != "$MAIL_HOST" ]]; then + if [[ $old_hostname != "$MAIL_HOST" && $old_hostname != kd ]]; then m $old_shell systemctl --now disable btrbk.timer fi m $new_shell systemctl --now enable btrbk.timer