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 |
| 15 | |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 16 | pre-stop script |
| 17 | /opt/onos/bin/onos halt 2>/opt/onos/var/stderr.log |
tom | defed6f | 2014-09-29 11:37:02 -0700 | [diff] [blame] | 18 | sleep 2 |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 19 | end script |
| 20 | |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 21 | script |
| 22 | [ -f /opt/onos/options ] && . /opt/onos/options |
| 23 | start-stop-daemon --signal INT --start --chuid sdn \ |
tom | 1a2908c | 2014-09-23 16:37:39 -0700 | [diff] [blame] | 24 | --exec /opt/onos/bin/onos-service -- $ONOS_OPTS \ |
tom | 0eaa97f | 2014-09-22 16:13:06 -0700 | [diff] [blame] | 25 | >/opt/onos/var/stdout.log 2>/opt/onos/var/stderr.log |
| 26 | end script |