summaryrefslogtreecommitdiff
path: root/debian/sync-httpd.postinst
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-20 22:09:35 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-20 22:11:32 +0200
commit67d9eff0193a5ebc360a4200fa560d883177068f (patch)
treeb24e8ee3382b95ba7fdf2f9f8e46749701cd9900 /debian/sync-httpd.postinst
parente03d7255f55b517f174b1f0157a5d9e6c55f23ff (diff)
downloadsync-67d9eff0193a5ebc360a4200fa560d883177068f.tar.gz
sync-67d9eff0193a5ebc360a4200fa560d883177068f.tar.bz2
sync-67d9eff0193a5ebc360a4200fa560d883177068f.zip
fix debian package, in particular DB setup
Diffstat (limited to 'debian/sync-httpd.postinst')
-rw-r--r--debian/sync-httpd.postinst16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/sync-httpd.postinst b/debian/sync-httpd.postinst
index 60393ad..9eaddab 100644
--- a/debian/sync-httpd.postinst
+++ b/debian/sync-httpd.postinst
@@ -2,6 +2,22 @@
set -e
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
+if [ "$1" = "remove" ]; then
+ if [ -x "/usr/bin/deb-systemd-helper" ]; then
+ deb-systemd-helper mask 'sync-httpd.service' >/dev/null || true
+ fi
+fi
+
+if [ "$1" = "purge" ]; then
+ if [ -x "/usr/bin/deb-systemd-helper" ]; then
+ deb-systemd-helper purge 'sync-httpd.service' >/dev/null || true
+ deb-systemd-helper unmask 'sync-httpd.service' >/dev/null || true
+ fi
+fi
+
SYNC_HOME="/var/lib/sync/"
_USERNAME=sync-httpd
_GROUPNAME=www-data