25 lines
626 B
Text
25 lines
626 B
Text
description "traefik agent"
|
|
|
|
start on runlevel [2345]
|
|
stop on runlevel [!2345]
|
|
|
|
respawn
|
|
|
|
script
|
|
if [ -f /etc/default/traefik ]; then
|
|
. /etc/default/traefik
|
|
fi
|
|
|
|
# Make sure to use all our CPUs, because traefik 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 ${TRAEFIK_USER:-traefik}:${TRAEFIK_GROUP:-traefik} \
|
|
--exec /usr/local/bin/traefik agent -- \
|
|
-config-dir="/etc/traefik.d" \
|
|
${TRAEFIK_FLAGS} \
|
|
>> /var/log/traefik.log 2>&1
|
|
end script
|