remove systemd user service cmds from postinst.sh

This commit is contained in:
dandersch 2025-05-23 22:52:25 +02:00 committed by GitHub
parent b6983e6866
commit 0581a9e680
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 8 deletions

View File

@ -41,13 +41,16 @@ if [ "$1" = "configure" ] || [ "$1" -ge 1 ]; then
systemctl restart ntfy-client.service >/dev/null || true
fi
fi
if systemctl --user is-active -q ntfy-client.service; then
echo "Restarting ntfy-client.service (user)..."
if [ -x /usr/bin/deb-systemd-invoke ]; then
deb-systemd-invoke --user try-restart ntfy-client.service >/dev/null || true
else
systemctl --user restart ntfy-client.service >/dev/null || true
fi
fi
# inform user about systemd user service
echo
echo "------------------------------------------------------------------------"
echo "ntfy includes a systemd user service."
echo "To enable it, run following commands as your regular user (not as root):"
echo
echo " systemctl --user enable ntfy-client.service"
echo " systemctl --user start ntfy-client.service"
echo "------------------------------------------------------------------------"
echo
fi
fi