iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor improvements
[distro-setup]
/
install-my-scripts
diff --git
a/install-my-scripts
b/install-my-scripts
index 58333732b71fd6b7dfb04269026dacc9c601af54..6d27eeea51a04e1a7dcdf188216b87d20c001768 100755
(executable)
--- a/
install-my-scripts
+++ b/
install-my-scripts
@@
-27,6
+27,18
@@
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file
x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file
+m() {
+ "$@"
+}
+
+# be a bit more verbose if we are connected to a terminal
+if test -t 0; then
+ #echo debug: in terminal
+ m() {
+ echo "$*"
+ "$@"
+ }
+fi
# scripts that would interfere with unmounting /a, put them elsewhere.
# note: previously used the install command, but it had this habit of
# scripts that would interfere with unmounting /a, put them elsewhere.
# note: previously used the install command, but it had this habit of
@@
-35,15
+47,20
@@
x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file
# ran. Very strange, dunno why, but rsync won't do anything unless these
# changed, so that should fix it.
/a/bin/log-quiet/setup
# ran. Very strange, dunno why, but rsync won't do anything unless these
# 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 myi3status mailtest-check \
+rsync -tl --chmod=755 --chown=root:root \
+ switch-mail-host \
+ switch-host2 \
+ btrbk-run mount-latest-subvol \
+ check-subvol-stale myi3status \
mailbindwatchdog \
mailbindwatchdog \
- /a/bin/log-quiet/sysd-mail-once hssh \
check-mailq \
unsaved-buffers.el \
mail-backup-clean \
iptables-exim \
ip6tables-exim \
check-mailq \
unsaved-buffers.el \
mail-backup-clean \
iptables-exim \
ip6tables-exim \
+ exim-nn-iptables \
+ check-crypttab \
+ /a/bin/cedit/cedit \
/usr/local/bin
rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib
/usr/local/bin
rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib
@@
-51,24
+68,31
@@
cmd=( rsync -aiSAX --chown=root:root --chmod=g-s
epanic-clean
system-status
btrfsmaint
epanic-clean
system-status
btrfsmaint
+ mailtest-check
dynamic-ip-update /usr/local/bin
)
sre() {
service=$1
if [[ $(systemctl is-active $1.service ||:) != inactive ]]; then
dynamic-ip-update /usr/local/bin
)
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.
+ m systemctl restart $service ||: &
fi
}
while read -r line; do
file="${line:12}"
fi
}
while read -r line; do
file="${line:12}"
-
echo
$file
+
#echo debug: file:
$file
case $file in
btrfsmaint)
sre btrfsmaintstop
;;
case $file in
btrfsmaint)
sre btrfsmaintstop
;;
+ mailtest-check)
+ # we stopped removing the dashes in services recently.
+ sre $file
+ ;;
*)
sre ${file//-/}
;;
*)
sre ${file//-/}
;;