onos.conf
670 Bytes
description "Open Network Operating System"
author "ON.Lab"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
console output
kill timeout 60
respawn
env LANG=en_US.UTF-8
#env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
#env NEW_JAVA_HOME=/usr/lib/jvm/java-8-oracle/
pre-stop script
/opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log
sleep 2
end script
script
[ -f /opt/onos/options ] && . /opt/onos/options
start-stop-daemon --signal INT --start --chuid sdn \
--exec /opt/onos/bin/onos-service -- $ONOS_OPTS \
>/opt/onos/var/stdout.log 2>/opt/onos/var/stderr.log
end script