File: bitlbee-common.preinst

package info (click to toggle)
bitlbee 3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,392 kB
  • sloc: ansic: 29,135; xml: 2,282; sh: 905; makefile: 389; python: 221; perl: 41
file content (20 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

NAME=bitlbee
PIDFILE=/var/run/$NAME.pid

# git revision 7949d5a introduced dh_systemd.
DH_SYSTEMD_REV="3.4.2+20160612+master+41-g7949d5a-git"

# if upgrading from something older (including 3.4.2), kill the old daemon.
# do this just once, this time, to allow systemd to manage it.
if [ "$1" = 'upgrade' ]; then
	if dpkg --compare-versions $2 lt $DH_SYSTEMD_REV; then
		# we may not have init scripts here
		start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --name $NAME
	fi
fi

#DEBHELPER#