Thomas Vachuska | 9edca30 | 2014-11-22 17:06:42 -0800 | [diff] [blame] | 1 | description "Open Network Operating System" |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 2 | author "ON.Lab" |
| 3 | |
| 4 | start on (net-device-up |
| 5 | and local-filesystems |
| 6 | and runlevel [2345]) |
| 7 | stop on runlevel [016] |
| 8 | |
| 9 | console output |
| 10 | kill timeout 60 |
| 11 | respawn |
| 12 | |
| 13 | env LANG=en_US.UTF-8 |
Yuta HIGUCHI | f2548cb | 2014-11-03 18:02:25 -0800 | [diff] [blame] | 14 | #env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
| 15 | #env NEW_JAVA_HOME=/usr/lib/jvm/java-8-oracle/ |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 16 | |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 17 | pre-stop script |
| 18 | /opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log |
tom | defed6f | 2014-09-29 11:37:02 -0700 | [diff] [blame] | 19 | sleep 2 |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 20 | end script |
| 21 | |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 22 | script |
| 23 | [ -f /opt/onos/options ] && . /opt/onos/options |
Charles M.C. Chan | 0a4fa79 | 2014-12-11 18:50:08 +0800 | [diff] [blame] | 24 | start-stop-daemon --signal INT --start --chuid $ONOS_USER \ |
tom | 1a2908c | 2014-09-23 16:37:39 -0700 | [diff] [blame] | 25 | --exec /opt/onos/bin/onos-service -- $ONOS_OPTS \ |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 26 | >/opt/onos/var/stdout.log 2>/opt/onos/var/stderr.log |
| 27 | end script |