Skip to content

Commit 11a5b18

Browse files
committed
packaging: don't fail if systemd is not ready
1 parent f4d3a0e commit 11a5b18

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packaging/prerm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/sh
22

3-
systemctl disable grafsy.service
4-
systemctl stop grafsy.service
3+
if [ -x /bin/systemctl ] && [ -d /run/systemd/system ]; then
4+
systemctl stop grafsy.service || true
5+
systemctl disable grafsy.service || true
6+
else
7+
echo "Systemd not detected, skipping service stop/disable."
8+
fi
9+

0 commit comments

Comments
 (0)