Skip to content

Commit

Permalink
postrm: add script to clean systemd on uninstall
Browse files Browse the repository at this point in the history
This script stops and disables the dnc.service unit file and removes it.
It's a fix for an issue where, on upgrade or uninstall+install, the
service file became 'masked' and linked to /dev/null.

Change-Id: Ifcc6bc42212e0241c775cdd24df5f937780e0a9b
  • Loading branch information
loulou123546 committed Jul 24, 2024
1 parent 8ea2677 commit 366f384
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extras/packaging/gnu-linux/debian/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

(test -x /usr/bin/systemctl && systemctl stop dnc.service && systemctl disable dnc.service && echo "stopped dnc.service") || true

(test -e /etc/systemd/system/dnc.service && rm -f /etc/systemd/system/dnc.service) || true

exit 0

0 comments on commit 366f384

Please sign in to comment.