X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=install-my-scripts;h=58333732b71fd6b7dfb04269026dacc9c601af54;hb=b18dade73dedfe69aa741f8417947d83c4208f2d;hp=67a576a4919c230c338892575f7ec6c2a3215111;hpb=2b981100a8b45f117d6f5c165404937f3c917e8f;p=distro-setup diff --git a/install-my-scripts b/install-my-scripts index 67a576a..5833373 100755 --- a/install-my-scripts +++ b/install-my-scripts @@ -36,11 +36,9 @@ 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 \ + check-subvol-stale myi3status mailtest-check \ + mailbindwatchdog \ /a/bin/log-quiet/sysd-mail-once hssh \ - btrfsmaint \ - dynamic-ip-update \ check-mailq \ unsaved-buffers.el \ mail-backup-clean \ @@ -48,3 +46,31 @@ rsync -t --chmod=755 --chown=root:root switch-mail-host btrbk-run mount-latest-s ip6tables-exim \ /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 + systemctl restart $service + fi + +} + +while read -r line; do + file="${line:12}" + echo $file + case $file in + btrfsmaint) + sre btrfsmaintstop + ;; + *) + sre ${file//-/} + ;; + esac +done < <("${cmd[@]}")