Skip to content

Instantly share code, notes, and snippets.

@zealws
Created October 2, 2015 20:28
Show Gist options
  • Save zealws/6efafd3d4df56574441e to your computer and use it in GitHub Desktop.
Save zealws/6efafd3d4df56574441e to your computer and use it in GitHub Desktop.
ATCD_WAN=eth0
ATCD_LAN=eth1
# Augmented Traffic Control Daemon
version "0.0.1"
description "Augmented Traffic Control Daemon"
start on (started networking)
stop on (stopped networking)
chdir /var/lib/atc
respawn
respawn limit 2 1
# Defaults
# Can be overridden in /etc/default/atcd
env ATCD_LOG_FILE=/var/log/atc/atcd.log
env ATCD_LISTEN_ADDRESS=0.0.0.0
env ATCD_LISTEN_PORT=9090
env ATCD_VENV=/usr/local/atc/venv
env ATCD_WAN=eth0
env ATCD_LAN=eth1
env ATCD_MODE=secure
script
[ -f "/etc/default/atcd" ] && . /etc/default/atcd
[ -d "$ATCD_VENV" ] && . "$ATCD_VENV/bin/activate"
atcd --atcd-mode "$ATCD_MODE" --thrift-host "$ATCD_LISTEN_ADDRESS" --thrift-port "$ATCD_LISTEN_PORT" --atcd-lan "$ATCD_LAN" --atcd-wan "$ATCD_WAN" &> "$ATCD_LOG_FILE"
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment