X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=install-my-scripts;h=c932cfef6a256467a06d2d470a9eb0a8624b6ff1;hb=5b09fb8ae01ae1c9aa5c3ccde60f6e6a22f7d6a6;hp=6274111e0c830c2f4006939254b34ed396222c5a;hpb=7d9ec600a5ed9f88b85e02a27ee017b85721a6ac;p=distro-setup diff --git a/install-my-scripts b/install-my-scripts index 6274111..c932cfe 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -36,10 +36,43 @@ x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file # changed, so that should fix it. /a/bin/log-quiet/setup rsync -t --chmod=755 --chown=root:root switch-mail-host btrbk-run mount-latest-subvol \ - check-subvol-stale system-status myi3status mailtest-check \ - epanic-clean mailbindwatchdog \ - /a/bin/log-quiet/sysd-mail-once hssh \ - btrfsmaint \ - dynamic-ip-update \ + check-subvol-stale myi3status mailtest-check \ + mailbindwatchdog \ + check-mailq \ + unsaved-buffers.el \ + mail-backup-clean \ + iptables-exim \ + ip6tables-exim \ + exim-nn-iptables \ + check-crypttab \ /usr/local/bin rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib + +cmd=( rsync -aiSAX --chown=root:root --chmod=g-s + epanic-clean + system-status + btrfsmaint + dynamic-ip-update /usr/local/bin + ) + +sre() { + service=$1 + if [[ $(systemctl is-active $1.service ||:) != inactive ]]; then + # 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}" + case $file in + btrfsmaint) + sre btrfsmaintstop & + ;; + *) + sre ${file//-/} & + ;; + esac +done < <("${cmd[@]}")