Improves safe-*
This commit is contained in:
+1
-7
@@ -1,11 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -o errexit -o pipefail -o noclobber -o nounset -o errtrace -o functrace
|
||||
|
||||
users=(arr gitea homeassistant immich jdownloader kiwix komga navidrome nextcloud nginx pairdrop paperless pihole qbittorrent synapse wallabag)
|
||||
for user in "${users[@]}"; do
|
||||
readarray -t units <<< "$(systemctl --user -M "${user}@" list-units | grep container | grep running | grep service | awk '{print $1}')" || true
|
||||
if [[ "${#units[@]}" -gt 0 && -n "${units[0]:-}" ]]; then
|
||||
systemctl --user -M "${user}@" stop "${units[@]}"
|
||||
fi
|
||||
done
|
||||
/opt/bin/safe-stop
|
||||
systemctl reboot
|
||||
|
||||
Reference in New Issue
Block a user