Changeset 7a3d2c7
- Timestamp:
- 2017-01-02T06:44:38Z (8 years ago)
- Branches:
- master
- Children:
- 73e2b69
- Parents:
- 8768f67
- git-author:
- dequis <dx@…> (01-01-17 22:40:09)
- git-committer:
- dequis <dx@…> (02-01-17 06:44:38)
- Location:
- debian
- Files:
-
- 17 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
debian/bitlbee-common.init
r8768f67 r7a3d2c7 23 23 [ -x $DAEMON ] || exit 0 24 24 25 # Default value26 BITLBEE_PORT=666727 25 BITLBEE_OPTS=-F 28 29 # Read config file if it is present.30 if [ -r /etc/default/$NAME ]; then31 . /etc/default/$NAME32 fi33 26 34 27 … … 42 35 43 36 start-stop-daemon --start --quiet --pidfile $PIDFILE \ 44 --exec $DAEMON -- - p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS37 --exec $DAEMON -- -P $PIDFILE $BITLBEE_OPTS 45 38 } 46 39 … … 56 49 case "$1" in 57 50 start) 58 [ "$BITLBEE_DISABLED" = "1" ] && exit 059 60 51 echo -n "Starting $DESC: $NAME" 61 52 d_start -
debian/bitlbee-common.postinst
r8768f67 r7a3d2c7 3 3 set -e 4 4 5 . /usr/share/debconf/confmodule6 7 db_get bitlbee/serveport8 PORT="$RET"9 10 5 CONFDIR=/var/lib/bitlbee/ 11 6 12 ## Load default option. Don't want to put this in debconf (yet?) 13 BITLBEE_OPTS=-F 14 BITLBEE_DISABLED=0 15 BITLBEE_UPGRADE_DONT_RESTART=0 16 [ -r /etc/default/bitlbee ] && . /etc/default/bitlbee 17 18 if [ "$BITLBEE_DISABLED" = "0" ] && which update-inetd > /dev/null 2> /dev/null && 19 ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then 20 ## Make sure the inetd entry is gone (can still be there from a 21 ## previous version. 22 update-inetd --remove '.*/usr/sbin/bitlbee' 23 if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then 24 # Thanks for breaking update-inetd! (bugs.debian.org/311111) 25 # I hope that it works at least with xinetd, because this 26 # emergency hack doesn't: 27 perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf 28 killall -HUP inetd || true 29 fi 30 fi 31 32 cat<<EOF>/etc/default/bitlbee 7 if [ -e /etc/default/bitlbee ]; then 8 cat <<EOF >/etc/default/bitlbee 33 9 ## /etc/default/bitlbee: Auto-generated/updated script. 34 10 ## 35 ## If running in (fork)daemon mode, listen on this TCP port. 36 BITLBEE_PORT="$PORT" 37 38 ## Use single-process or forking daemon mode? Can't be changed from debconf, 39 ## but maintainer scripts will save your changes here. 40 BITLBEE_OPTS="$BITLBEE_OPTS" 41 42 ## In case you want to stick with inetd mode (or if you just want to disable 43 ## the init scripts for some other reason), you can disable the init script 44 ## here. (Just set it to 1) 45 BITLBEE_DISABLED=$BITLBEE_DISABLED 46 47 ## As a server operator, you can use the RESTART command to restart only the 48 ## master process while keeping all the child processes and their IPC 49 ## connections. By enabling this, the maintainer scripts won't restart 50 ## BitlBee during upgrades so you can restart the master process by hand. 51 BITLBEE_UPGRADE_DONT_RESTART=$BITLBEE_UPGRADE_DONT_RESTART 11 ## This file is deprecated and no longer used. 12 ## Please edit /etc/bitlbee/bitlbee.conf instead 52 13 EOF 53 14 54 ## Bye-bye DebConf, we don't need you anymore. 55 db_stop 15 fi 56 16 57 17 ## Restore the helpfile in case we weren't upgrading but just reconfiguring: … … 64 24 fi 65 25 66 if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" -a-n "$2" -a -x "/etc/init.d/bitlbee" ]; then26 if [ -n "$2" -a -x "/etc/init.d/bitlbee" ]; then 67 27 invoke-rc.d bitlbee restart 68 28 fi
Note: See TracChangeset
for help on using the changeset viewer.