formula-fabio/fabio/files/fabio.upstart
2018-05-17 17:36:29 -04:00

25 lines
602 B
Text

description "fabio agent"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
if [ -f /etc/default/fabio ]; then
. /etc/default/fabio
fi
# Make sure to use all our CPUs, because fabio can block a scheduler thread
export GOMAXPROCS=`nproc`
# Get the public IP
BIND=`ifconfig eth0 | grep "inet addr" | awk '{ print substr($2,6) }'`
exec start-stop-daemon --start \
--chuid ${fabio_USER:-fabio}:${fabio_GROUP:-fabio} \
--exec /usr/local/bin/fabio agent -- \
-config-dir="/etc/fabio.d" \
${fabio_FLAGS} \
>> /var/log/fabio.log 2>&1
end script