various fixes
[distro-setup] / install-my-scripts
index 58333732b71fd6b7dfb04269026dacc9c601af54..cb5435057993d96d92ca3e11576138e727a88b39 100755 (executable)
@@ -38,7 +38,7 @@ x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file
 rsync -t --chmod=755 --chown=root:root switch-mail-host btrbk-run mount-latest-subvol \
       check-subvol-stale myi3status mailtest-check \
       mailbindwatchdog \
-      /a/bin/log-quiet/sysd-mail-once hssh \
+      /a/bin/log-quiet/sysd-mail-once \
       check-mailq \
       unsaved-buffers.el \
       mail-backup-clean \
@@ -57,20 +57,21 @@ cmd=( rsync -aiSAX --chown=root:root --chmod=g-s
 sre() {
   service=$1
   if [[ $(systemctl is-active $1.service ||:) != inactive ]]; then
-    systemctl restart $service
+    # just fire and forget. sometimes a script restart can fail, but then
+    # then auto restart mechanism makes it succeed.
+    systemctl restart $service ||: &
   fi
 
 }
 
 while read -r line; do
   file="${line:12}"
-  echo $file
   case $file in
     btrfsmaint)
-      sre btrfsmaintstop
+      sre btrfsmaintstop &
       ;;
     *)
-      sre ${file//-/}
+      sre ${file//-/} &
       ;;
   esac
 done < <("${cmd[@]}")