Improves safe-*
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user