summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-12-23 13:27:46 -0200
committerdrebs <drebs@leap.se>2016-12-23 16:02:33 -0200
commitf863ac6135e8c0f1190ad2648db2ef2448bf1372 (patch)
tree4124d37fb81ae64bcec4b35da6374b11bced1be7
parent156fc02779dcd11b95184f98faca08b7ee5343bb (diff)
[pkg] use systemd in debian package
-rw-r--r--debian/control2
-rwxr-xr-xdebian/rules2
l---------debian/soledad-server.init1
-rw-r--r--debian/soledad-server.postinst5
4 files changed, 5 insertions, 5 deletions
diff --git a/debian/control b/debian/control
index 6585b8cb..c24baa15 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
Priority: optional
Maintainer: Micah Anderson <micah@debian.org>
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 9),
- dh-python
+ dh-python, dh-systemd (>= 1.5)
Standards-Version: 3.9.6
Package: soledad-server
diff --git a/debian/rules b/debian/rules
index 97b74544..65863e7a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@
#DH_VERBOSE=1
%:
- dh $@ --with python2 --namespace=leap.soledad
+ dh $@ --with systemd --with python2 --namespace=leap.soledad
override_dh_auto_clean:
cd client && python setup.py clean -a
diff --git a/debian/soledad-server.init b/debian/soledad-server.init
deleted file mode 120000
index 6448df05..00000000
--- a/debian/soledad-server.init
+++ /dev/null
@@ -1 +0,0 @@
-../server/pkg/soledad-server \ No newline at end of file
diff --git a/debian/soledad-server.postinst b/debian/soledad-server.postinst
index 0f46caf6..f7dadaed 100644
--- a/debian/soledad-server.postinst
+++ b/debian/soledad-server.postinst
@@ -26,5 +26,6 @@ if [ ! $RET -eq 0 ]; then
adduser --system soledad-admin --no-create-home --home /srv/leap/ --ingroup soledad
fi
-
-invoke-rc.d soledad-server start
+# update systemd and start service
+systemctl --system daemon-reload >/dev/null || true
+deb-systemd-invoke start soledad-server.service >/dev/null || true