tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 1 | description "Open Networking Operating System" |
| 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 |
| 14 | env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
Thomas Vachuska | 4b42077 | 2014-10-30 16:46:17 -0700 | [diff] [blame] | 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 |
| 24 | start-stop-daemon --signal INT --start --chuid sdn \ |
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 |