babeld: Print an error when startup fails

This commit is contained in:
Baptiste Jonglez 2014-08-28 01:41:42 +02:00
parent f81d53fad2
commit 84422673a4

View file

@ -132,6 +132,12 @@ start() {
config_foreach babel_filter filter config_foreach babel_filter filter
# Using multiple config files is supported since babeld 1.5.1 # Using multiple config files is supported since babeld 1.5.1
/usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE" /usr/sbin/babeld -D -I "$pidfile" -c "$OTHERCONFIGFILE" -c "$CONFIGFILE"
# Wait for the pidfile to appear
for i in 1 2
do
[ -f "$pidfile" ] || sleep 1
done
[ -f "$pidfile" ] || (echo "Failed to start babeld"; exit 42)
} }
stop() { stop() {