blob: 1d8f10af8842a427eac3d8f6290c2856c091cc28 [file] [log] [blame]
tom0eaa97f2014-09-22 16:13:06 -07001description "Open Networking Operating System"
2author "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
14env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
Thomas Vachuska4b420772014-10-30 16:46:17 -070015env 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
24 start-stop-daemon --signal INT --start --chuid sdn \
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