blob: 85c210d49876d6792e402ac45959083151be509b [file] [log] [blame]
Thomas Vachuska9edca302014-11-22 17:06:42 -08001description "Open Network Operating System"
tom0eaa97f2014-09-22 16:13:06 -07002author "ON.Lab"
3
4start on (net-device-up
5 and local-filesystems
6 and runlevel [2345])
7stop on runlevel [016]
8
9console output
10kill timeout 60
11respawn
12
13env LANG=en_US.UTF-8
Yuta HIGUCHIf2548cb2014-11-03 18:02:25 -080014#env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
15#env NEW_JAVA_HOME=/usr/lib/jvm/java-8-oracle/
tom0eaa97f2014-09-22 16:13:06 -070016
tomb41d1ac2014-09-24 01:51:24 -070017pre-stop script
18 /opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log
tomdefed6f2014-09-29 11:37:02 -070019 sleep 2
tomb41d1ac2014-09-24 01:51:24 -070020end script
21
tom0eaa97f2014-09-22 16:13:06 -070022script
23 [ -f /opt/onos/options ] && . /opt/onos/options
Charles M.C. Chan0a4fa792014-12-11 18:50:08 +080024 start-stop-daemon --signal INT --start --chuid $ONOS_USER \
tom1a2908c2014-09-23 16:37:39 -070025 --exec /opt/onos/bin/onos-service -- $ONOS_OPTS \
tom0eaa97f2014-09-22 16:13:06 -070026 >/opt/onos/var/stdout.log 2>/opt/onos/var/stderr.log
27end script