summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-init-invoke4
-rw-r--r--autoscripts/postinst-init-norestart-invoke8
-rw-r--r--autoscripts/postrm-init-invoke3
-rw-r--r--autoscripts/prerm-init-invoke3
-rw-r--r--autoscripts/prerm-init-norestart-invoke3
5 files changed, 21 insertions, 0 deletions
diff --git a/autoscripts/postinst-init-invoke b/autoscripts/postinst-init-invoke
new file mode 100644
index 0000000..217a7c8
--- /dev/null
+++ b/autoscripts/postinst-init-invoke
@@ -0,0 +1,4 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+ invoke-rc.d #SCRIPT# start
+fi
diff --git a/autoscripts/postinst-init-norestart-invoke b/autoscripts/postinst-init-norestart-invoke
new file mode 100644
index 0000000..440e8c7
--- /dev/null
+++ b/autoscripts/postinst-init-norestart-invoke
@@ -0,0 +1,8 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ update-rc.d #SCRIPT# #INITPARMS# >/dev/null
+ if [ "$1" = "configure" ]; then
+ if [ -z "$2" -o "$2" = "<unknown>" ]; then
+ invoke-rc.d #SCRIPT# start
+ fi
+ fi
+fi
diff --git a/autoscripts/postrm-init-invoke b/autoscripts/postrm-init-invoke
new file mode 100644
index 0000000..1c29298
--- /dev/null
+++ b/autoscripts/postrm-init-invoke
@@ -0,0 +1,3 @@
+if [ "$1" = "purge" ] ; then
+ update-rc.d #SCRIPT# remove >/dev/null
+fi
diff --git a/autoscripts/prerm-init-invoke b/autoscripts/prerm-init-invoke
new file mode 100644
index 0000000..ced7aba
--- /dev/null
+++ b/autoscripts/prerm-init-invoke
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ invoke-rc.d #SCRIPT# stop
+fi
diff --git a/autoscripts/prerm-init-norestart-invoke b/autoscripts/prerm-init-norestart-invoke
new file mode 100644
index 0000000..f04d45c
--- /dev/null
+++ b/autoscripts/prerm-init-norestart-invoke
@@ -0,0 +1,3 @@
+if [ -x "/etc/init.d/#SCRIPT#" -a "$1" = remove ]; then
+ invoke-rc.d #SCRIPT# stop
+fi