X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=0ce2b6514103dcb9fbd05a9bd25464c6c519000b;hb=110b15e4a7b19cc520d2aa3f2584f4213b94f5b7;hp=0bce486ecb4a3a50c4a2d8d81dbbdf73b0d6a08a;hpb=99846b0b4426cf1a187671ca0435d0bbc047e938;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index 0bce486..0ce2b65 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -197,7 +197,7 @@ e "On $new_host: umounting /m and /o, checking emacs" set -eE if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then export XDG_RUNTIME_DIR=/run/user/1000 - bufs="$(emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" + bufs="$(sudo -u iank 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 @@ -219,7 +219,7 @@ EOF $old_shell bash -s <<'EOF' if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then export XDG_RUNTIME_DIR=/run/user/1000 - bufs="$(emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')" + bufs="$(sudo -u iank 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