summaryrefslogtreecommitdiff
path: root/debian/pcp-webapi.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/pcp-webapi.postinst')
-rw-r--r--debian/pcp-webapi.postinst14
1 files changed, 14 insertions, 0 deletions
diff --git a/debian/pcp-webapi.postinst b/debian/pcp-webapi.postinst
new file mode 100644
index 0000000..80559e2
--- /dev/null
+++ b/debian/pcp-webapi.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+#DEBHELPER#
+
+# must match src/pmwebapi/GNUmakefile
+chown pcp:pcp /var/log/pcp/pmwebd
+chmod 775 /var/log/pcp/pmwebd
+
+update-rc.d pmwebd defaults >/dev/null
+
+if which invoke-rc.d >/dev/null 2>&1; then
+ invoke-rc.d pmwebd start
+else
+ /etc/init.d/pmwebd start
+fi