X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=switch-mail-host;h=15986953039ea2ae002af37006d2dcb72045adc0;hb=410b30bc4194a6c84db5d73b15a7e211ce47bc9c;hp=10fcd9f12d82c580e1ee3536c2ac51ed08e9c969;hpb=1059b8ac11f567b9a8eec1e34a7ab6e791721dca;p=distro-setup diff --git a/switch-mail-host b/switch-mail-host index 10fcd9f..1598695 100644 --- a/switch-mail-host +++ b/switch-mail-host @@ -26,10 +26,10 @@ restore_new_btrbk=false restore_old_btrbk=false cleanup() { if $restore_new_btrbk; then - $new_shell sudo systemctl start btrbk.timer + m $new_shell sudo systemctl start btrbk.timer fi if $restore_old_btrbk; then - $old_shell sudo systemctl start btrbk.timer + m $old_shell sudo systemctl start btrbk.timer fi } _errcatch_cleanup=cleanup # used by sourced err @@ -59,8 +59,8 @@ old_host=$1 new_host=$2 source /a/bin/bash_unpublished/source-state -if [[ $old_host != $MAIL_HOST ]]; then - read -p "warning: \$old_host != \$MAIL_HOST: $old_host != $MAIL_HOST, proceed? y/N " +if [[ $old_host != "$MAIL_HOST" ]]; then + read -r -p "warning: \$old_host != \$MAIL_HOST: $old_host != $MAIL_HOST, proceed? y/N " if [[ $REPLY != [yY] ]]; then exit 1 fi