Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for starting/stopping deamons.
On debian and ubuntu the init scripts are not registered on install and unregistered on deinstall of the package. Added the right calls to the postint script of the different daemons and added prerm scripts to do the right thing on deinstall. Fixes #86: No start scripts created during installation
- Loading branch information
Marco van Wieringen
committed
Feb 17, 2015
1 parent
bf60290
commit 9355be4
Showing
6 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
# prerm script for bareos | ||
# | ||
# see: dh_installdeb(1) | ||
|
||
set -e | ||
|
||
# summary of how this script can be called: | ||
# * <prerm> `remove' | ||
# * <old-prerm> `upgrade' <new-version> | ||
# * <new-prerm> `failed-upgrade' <old-version> | ||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> | ||
# * <deconfigured's-prerm> `deconfigure' `in-favour' | ||
# <package-being-installed> <version> `removing' | ||
# <conflicting-package> <version> | ||
# for details, see http://www.debian.org/doc/debian-policy/ or | ||
# the debian-policy package | ||
|
||
disable_rc_scripts() | ||
{ | ||
update-rc.d -f bareos-dir remove | ||
} | ||
|
||
case "$1" in | ||
remove|deconfigure) | ||
disable_rc_scripts | ||
;; | ||
failed-upgrade|upgrade) | ||
;; | ||
*) | ||
echo "prerm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# dh_installdeb will replace this with shell code automatically | ||
# generated by other debhelper scripts. | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
# prerm script for bareos | ||
# | ||
# see: dh_installdeb(1) | ||
|
||
set -e | ||
|
||
# summary of how this script can be called: | ||
# * <prerm> `remove' | ||
# * <old-prerm> `upgrade' <new-version> | ||
# * <new-prerm> `failed-upgrade' <old-version> | ||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> | ||
# * <deconfigured's-prerm> `deconfigure' `in-favour' | ||
# <package-being-installed> <version> `removing' | ||
# <conflicting-package> <version> | ||
# for details, see http://www.debian.org/doc/debian-policy/ or | ||
# the debian-policy package | ||
|
||
disable_rc_scripts() | ||
{ | ||
update-rc.d -f bareos-fd remove | ||
} | ||
|
||
case "$1" in | ||
remove|deconfigure) | ||
disable_rc_scripts | ||
;; | ||
failed-upgrade|upgrade) | ||
;; | ||
*) | ||
echo "prerm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# dh_installdeb will replace this with shell code automatically | ||
# generated by other debhelper scripts. | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
# prerm script for bareos | ||
# | ||
# see: dh_installdeb(1) | ||
|
||
set -e | ||
|
||
# summary of how this script can be called: | ||
# * <prerm> `remove' | ||
# * <old-prerm> `upgrade' <new-version> | ||
# * <new-prerm> `failed-upgrade' <old-version> | ||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> | ||
# * <deconfigured's-prerm> `deconfigure' `in-favour' | ||
# <package-being-installed> <version> `removing' | ||
# <conflicting-package> <version> | ||
# for details, see http://www.debian.org/doc/debian-policy/ or | ||
# the debian-policy package | ||
|
||
disable_rc_scripts() | ||
{ | ||
update-rc.d -f bareos-sd remove | ||
} | ||
|
||
case "$1" in | ||
remove|deconfigure) | ||
disable_rc_scripts | ||
;; | ||
failed-upgrade|upgrade) | ||
;; | ||
*) | ||
echo "prerm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# dh_installdeb will replace this with shell code automatically | ||
# generated by other debhelper scripts. | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |