]> git.donarmstrong.com Git - debhelper.git/blobdiff - autoscripts/prerm-init-norestart
debian/compress files are now deprecated. Seems only one package (genesis) still...
[debhelper.git] / autoscripts / prerm-init-norestart
index ec9820f8769f5d876eb6018036565cf5ea340c89..9b63174811895524939fe2edaa38c0e70488e4b3 100644 (file)
@@ -1,3 +1,7 @@
-if [ "$1" = remove ]; then
-       /etc/init.d/#SCRIPT# stop
+if [ -x "/etc/init.d/#SCRIPT#" ] && [ "$1" = remove ]; then
+       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+               invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER#
+       else
+               /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER#
+       fi
 fi