aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/package/debian/onos.conf
blob: 634a263674d8dd0d251f2776319c599e381e71da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
description  "Open Network Operating System"
author       "ON.Lab"

start on (net-device-up
          and local-filesystems
          and runlevel [2345])
stop on runlevel [016]

console output
kill timeout 60
respawn

env LANG=en_US.UTF-8
#env JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
#env NEW_JAVA_HOME=/usr/lib/jvm/java-8-oracle/

pre-stop script
    /opt/onos/bin/onos halt 2>>/opt/onos/var/stderr.log
    sleep 1
end script

script
  [ -f /opt/onos/options ] && . /opt/onos/options
  start-stop-daemon --signal INT --start --chuid $ONOS_USER \
    --exec /opt/onos/bin/onos-service -- $ONOS_OPTS \
        >/opt/onos/var/stdout.log 2>/opt/onos/var/stderr.log
end script