summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-20 17:00:46 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-20 17:00:46 +0200
commitbc003c390f08031ec772ea0d1aaf9861c2ae03ac (patch)
tree696ac99f95fa8f8ab7673fe7b78c2e5464998ff2
parent28260c18ff29c17741e19cdee182632f041a963f (diff)
downloadmerchant-bc003c390f08031ec772ea0d1aaf9861c2ae03ac.tar.gz
merchant-bc003c390f08031ec772ea0d1aaf9861c2ae03ac.tar.bz2
merchant-bc003c390f08031ec772ea0d1aaf9861c2ae03ac.zip
-fix systemd integration
-rw-r--r--debian/control1
-rw-r--r--debian/taler-merchant.postinst16
-rw-r--r--debian/taler-merchant.prerm3
3 files changed, 20 insertions, 0 deletions
diff --git a/debian/control b/debian/control
index 84aa993b..587403d5 100644
--- a/debian/control
+++ b/debian/control
@@ -44,6 +44,7 @@ Depends:
adduser,
lsb-base,
netbase,
+ sudo,
apache2 | nginx | httpd,
postgresql,
dbconfig-pgsql | dbconfig-no-thanks,
diff --git a/debian/taler-merchant.postinst b/debian/taler-merchant.postinst
index 2f54b038..58c075d9 100644
--- a/debian/taler-merchant.postinst
+++ b/debian/taler-merchant.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 'taler-merchant-httpd.service' >/dev/null || true
+ fi
+fi
+
+if [ "$1" = "purge" ]; then
+ if [ -x "/usr/bin/deb-systemd-helper" ]; then
+ deb-systemd-helper purge 'taler-merchant-httpd.service' >/dev/null || true
+ deb-systemd-helper unmask 'taler-merchant-httpd.service' >/dev/null || true
+ fi
+fi
+
TALER_HOME="/var/lib/taler"
_USERNAME=taler-merchant-httpd
_GROUPNAME=www-data
diff --git a/debian/taler-merchant.prerm b/debian/taler-merchant.prerm
index 84d4c486..eccb8259 100644
--- a/debian/taler-merchant.prerm
+++ b/debian/taler-merchant.prerm
@@ -2,6 +2,9 @@
set -e
+if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
+ deb-systemd-invoke stop 'taler-merchant-httpd.service' >/dev/null || true
+fi
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule