rename err to bash-bear
[distro-setup] / switch-mail-host
index 3a362c3b5ace6bc2409d8226c75e684b459c5a1c..b31ab793951f6807879e37eb1dcfd7beaf5ed39c 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source /usr/local/lib/err
+source /usr/local/lib/bash-bear
 
 usage() {
   cat <<EOF
@@ -126,7 +126,7 @@ if ! $force && { $check_installed || [[ $direction == push ]]; } ; then
       uninstalled-file-die $f
     fi
   done
-  if ! diff -q /a/bin/errhandle/err /usr/local/lib/err; then
+  if ! diff -q /a/bin/bash-bear-trap/bash-bear /usr/local/lib/bash-bear; then
     uninstalled-file-die err
   fi
   if $check_installed; then
@@ -167,7 +167,7 @@ case $direction in
         e "found different version on old_host=$old_hostname, reexecing"
         m install -T $tmpf /usr/local/bin/switch-mail-host
         m /usr/local/bin/switch-mail-host --pull-reexec "${orig_args[@]}"
-        mexit 0
+        exit 0
       fi
     fi
 
@@ -294,7 +294,7 @@ fi
 
 # Try to prevent emacs from saving stale data it has in memory to disk. eg: files, recentf list, etc.
 # But if emacs ignores the signal, let it live.
-killall -q emacs ||:
+pkill -xf 'emacs( --daemon| -f znc-all)' ||:
 
 if [[ -e /p/profanity-here ]]; then
   systemctl disable --now profanity