Skip to content

Commit

Permalink
debian: synchronize with changes in master
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Aug 21, 2015
1 parent c8abf74 commit cab485f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
exabgp (3.4.12-3) unstable; urgency=medium

* init: use --folder to tell ExaBGP the location of /etc/exabgp
* init: let ExaBGP drops privileges itself.

-- Vincent Bernat <bernat@debian.org> Fri, 21 Aug 2015 18:38:37 +0200

exabgp (3.4.12-2) unstable; urgency=medium

* Disable more control tests. They seem to be unreliable when run in
Expand Down
16 changes: 6 additions & 10 deletions debian/exabgp.init
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,16 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="BGP route injector"
USER=exabgp
NAME=exabgp
CONFIG="/etc/exabgp/exabgp.conf"
DAEMON=/usr/sbin/exabgp
DAEMON_OPTS="$CONFIG"
DAEMON_OPTS="--folder /etc/exabgp $CONFIG"
PIDFILE=/var/run/$NAME/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x $DAEMON ] || exit 0

# Some env var the daemon will need
export ETC="/etc/exabgp/"

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

Expand All @@ -57,7 +53,7 @@ do_start()
# 1 if daemon was already running
# 2 if daemon could not be started
# We create the PID file and we do background thanks to start-stop-daemon
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $USER -b -m --exec $DAEMON -- $DAEMON_OPTS
start-stop-daemon --start --quiet --pidfile $PIDFILE -b -m --exec $DAEMON -- $DAEMON_OPTS
return $?
}

Expand All @@ -71,7 +67,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --signal TERM --pidfile $PIDFILE -c $USER
start-stop-daemon --stop --quiet --signal TERM --pidfile $PIDFILE
RETVAL="$?"
sleep 1
# clean stale PID file
Expand All @@ -93,18 +89,18 @@ do_stop()
# Function that sends a SIGUSR1 to the daemon/service
#
do_reload() {
start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE -c $USER
start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE
return 0
}

do_force_reload() {
start-stop-daemon --stop --signal USR2 --quiet --pidfile $PIDFILE -c $USER
start-stop-daemon --stop --signal USR2 --quiet --pidfile $PIDFILE
return 0
}

case "$1" in
start)
start-stop-daemon --status --quiet --pidfile $PIDFILE -c $USER
start-stop-daemon --status --quiet --pidfile $PIDFILE
retval=$?
if [ $retval -eq 0 ] ; then
log_warning_msg "$NAME is already running"
Expand Down
4 changes: 2 additions & 2 deletions debian/exabgp.upstart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ stop on runlevel [!2345]
console none
respawn
umask 022
reload signal USR1

env PATH=/sbin:/usr/sbin:/bin:/usr/bin
env USER=exabgp
Expand All @@ -14,7 +15,6 @@ env DAEMON=/usr/sbin/exabgp
env DAEMON_OPTS=/etc/exabgp/exabgp.conf
env CONFIG=/etc/exabgp/exabgp.conf
env PIDFILE=/var/run/exabgp/exabgp.pid
env ETC=/etc

pre-start script
[ -f /etc/default/$NAME ] && . /etc/default/$NAME start
Expand All @@ -32,5 +32,5 @@ script
export exabgp_daemon_user
exabgp_daemon_pid=$PIDFILE
export exabgp_daemon_pid
$DAEMON $DAEMON_OPTS
$DAEMON --folder /etc/exabgp $DAEMON_OPTS
end script

0 comments on commit cab485f

Please sign in to comment.