summarylogtreecommitdiffstats
path: root/gincamalarm.install
diff options
context:
space:
mode:
Diffstat (limited to 'gincamalarm.install')
-rw-r--r--gincamalarm.install38
1 files changed, 38 insertions, 0 deletions
diff --git a/gincamalarm.install b/gincamalarm.install
new file mode 100644
index 000000000000..48a5f968dd2e
--- /dev/null
+++ b/gincamalarm.install
@@ -0,0 +1,38 @@
+post_install() {
+ pkgname=gincamalarm
+
+ # Fixing membership
+ chown root: /var/log/$pkgname
+ chown -R root: /etc/$pkgname
+
+ # Reload systemctl
+ systemctl daemon-reload
+
+ echo "Adding gincamalarm in systemctl:"
+ echo " systemctl enable gincamalarm"
+ echo " systemctl start gincamalarm"
+
+ true
+}
+
+post_upgrade() {
+ # Reload systemctl
+ systemctl daemon-reload
+
+ echo "You should restart gincamalarm"
+ echo " systemctl restart gincamalarm"
+
+ true
+}
+
+pre_remove() {
+ pkgname=gincamalarm
+ # Remove symlink in systemd
+ systemctl disable $pkgname
+ # Stop server
+ systemctl stop $pkgname
+ # Reload systemctl
+ systemctl daemon-reload
+
+ true
+} \ No newline at end of file