diff --git a/setup.sh b/setup.sh index 4de5848..0f9330e 100755 --- a/setup.sh +++ b/setup.sh @@ -11,7 +11,8 @@ while ! [[ "$podman_mode" =~ ^(rootful|rootless)$ ]]; do done -declare -a podman_units=(podman.service podman.socket podman-auto-update.service podman-auto-update.timer podman-clean-transient.service podman-restart.service) +declare -a en_podman_units=(podman.service podman.socket podman-clean-transient.service podman-restart.service) +declare -a dis_podman_units=(podman-auto-update.service podman-auto-update.timer) if [[ "$podman_mode" == "rootless" ]]; then @@ -19,13 +20,15 @@ if [[ "$podman_mode" == "rootless" ]]; then sudo loginctl enable-linger "$USER" - sudo systemctl disable --now "${podman_units[@]}" - systemctl --user enable --now "${podman_units[@]}" + sudo systemctl disable --now "${en_podman_units[@]}" "${dis_podman_units[@]}" + systemctl --user enable --now "${en_podman_units[@]}" + systemctl --user disable --now "${dis_podman_units[@]}" else sudo apt install -y aardvark-dns borgbackup cifs-utils curl nftables nginx podman podman-compose python3-mako - systemctl --user disable --now "${podman_units[@]}" - sudo systemctl enable --now "${podman_units[@]}" + systemctl --user disable --now "${en_podman_units[@]}" "${dis_podman_units[@]}" + sudo systemctl enable --now "${en_podman_units[@]}" + sudo systemctl disable --now "${dis_podman_units[@]}" fi