summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-systemd-enable1
-rw-r--r--autoscripts/postinst-systemd-enable-restart6
-rw-r--r--autoscripts/postinst-systemd-enable-start6
-rw-r--r--autoscripts/postinst-systemd-restart3
-rw-r--r--autoscripts/postinst-systemd-start3
-rw-r--r--autoscripts/postrm-systemd5
-rw-r--r--autoscripts/postrm-systemd-reload9
-rw-r--r--autoscripts/postrm-systemd-reload-only3
-rw-r--r--autoscripts/prerm-systemd3
-rw-r--r--autoscripts/prerm-systemd-restart3
10 files changed, 42 insertions, 0 deletions
diff --git a/autoscripts/postinst-systemd-enable b/autoscripts/postinst-systemd-enable
new file mode 100644
index 0000000..052dc0e
--- /dev/null
+++ b/autoscripts/postinst-systemd-enable
@@ -0,0 +1 @@
+deb-systemd-helper enable #UNITFILES# >/dev/null || true
diff --git a/autoscripts/postinst-systemd-enable-restart b/autoscripts/postinst-systemd-enable-restart
new file mode 100644
index 0000000..a63aa6b
--- /dev/null
+++ b/autoscripts/postinst-systemd-enable-restart
@@ -0,0 +1,6 @@
+deb-systemd-helper enable #UNITFILES# >/dev/null || true
+
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+ systemctl try-restart #UNITFILES# >/dev/null || true
+fi
diff --git a/autoscripts/postinst-systemd-enable-start b/autoscripts/postinst-systemd-enable-start
new file mode 100644
index 0000000..6cccdcf
--- /dev/null
+++ b/autoscripts/postinst-systemd-enable-start
@@ -0,0 +1,6 @@
+deb-systemd-helper enable #UNITFILES# >/dev/null || true
+
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+ systemctl start #UNITFILES# >/dev/null || true
+fi
diff --git a/autoscripts/postinst-systemd-restart b/autoscripts/postinst-systemd-restart
new file mode 100644
index 0000000..e96bc93
--- /dev/null
+++ b/autoscripts/postinst-systemd-restart
@@ -0,0 +1,3 @@
+if [ -d /run/systemd/system ]; then
+ systemctl try-restart #UNITFILES# >/dev/null || true
+fi
diff --git a/autoscripts/postinst-systemd-start b/autoscripts/postinst-systemd-start
new file mode 100644
index 0000000..bf6458b
--- /dev/null
+++ b/autoscripts/postinst-systemd-start
@@ -0,0 +1,3 @@
+if [ -d /run/systemd/system ]; then
+ systemctl start #UNITFILES# >/dev/null || true
+fi
diff --git a/autoscripts/postrm-systemd b/autoscripts/postrm-systemd
new file mode 100644
index 0000000..ddc2269
--- /dev/null
+++ b/autoscripts/postrm-systemd
@@ -0,0 +1,5 @@
+if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
+ if [ -x "/usr/bin/deb-systemd-helper" ]; then
+ deb-systemd-helper disable #UNITFILES# >/dev/null
+ fi
+fi
diff --git a/autoscripts/postrm-systemd-reload b/autoscripts/postrm-systemd-reload
new file mode 100644
index 0000000..d86be20
--- /dev/null
+++ b/autoscripts/postrm-systemd-reload
@@ -0,0 +1,9 @@
+if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
+ if [ -x "/usr/bin/deb-systemd-helper" ]; then
+ deb-systemd-helper disable #UNITFILES# >/dev/null
+ fi
+fi
+
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
diff --git a/autoscripts/postrm-systemd-reload-only b/autoscripts/postrm-systemd-reload-only
new file mode 100644
index 0000000..91cd9e8
--- /dev/null
+++ b/autoscripts/postrm-systemd-reload-only
@@ -0,0 +1,3 @@
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
diff --git a/autoscripts/prerm-systemd b/autoscripts/prerm-systemd
new file mode 100644
index 0000000..aa36110
--- /dev/null
+++ b/autoscripts/prerm-systemd
@@ -0,0 +1,3 @@
+if [ -d /run/systemd/system ]; then
+ systemctl stop #UNITFILES# >/dev/null
+fi
diff --git a/autoscripts/prerm-systemd-restart b/autoscripts/prerm-systemd-restart
new file mode 100644
index 0000000..6f4e584
--- /dev/null
+++ b/autoscripts/prerm-systemd-restart
@@ -0,0 +1,3 @@
+if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
+ systemctl stop #UNITFILES# >/dev/null
+fi