Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions packaging/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ fi
if [ ! -e "${CONF}" ]; then
echo "For use this software you have to create ${CONF} file. You could use /etc/grafsy/example/grafsy.toml as default"
else
# On debian jessie (systemd 215) it fails if symlink already exists
systemctl is-enabled grafsy || systemctl enable grafsy
# Check if systemd is up and running, e.g. not in chroot
if systemctl 1>/dev/null 2>&1; then
systemctl daemon-reload
systemctl restart grafsy.service
fi
deb-systemd-invoke daemon-reload
deb-systemd-helper enable grafsy.service
deb-systemd-invoke restart grafsy.service
fi
9 changes: 2 additions & 7 deletions packaging/prerm
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/bin/sh

if [ -x /bin/systemctl ] && [ -d /run/systemd/system ]; then
systemctl stop grafsy.service || true
systemctl disable grafsy.service || true
else
echo "Systemd not detected, skipping service stop/disable."
fi

deb-systemd-invoke stop grafsy.service
deb-systemd-helper disable grafsy.service
Loading