diff options
author | 2017-12-17 09:04:31 -0500 | |
---|---|---|
committer | 2017-12-17 09:05:11 -0500 | |
commit | 710d958a29198b6633236c1b7cad12babfe46833 (patch) | |
tree | 5819d23e6a3b9d4e111b3debaf41ee7fe7731a78 /conductor/examples/distribution/ubuntu/init/conductor-api.conf | |
parent | 22cff5d3b51d9aa2d4fd11f657264e41063add1c (diff) |
Added all common modules in conductor directory
Added the common modules used by all the other components of Homing Optimizer.
Change-Id: I6e8a991b54ef422da66b3174f27f6998731ec188
Issue-ID: OPTFRA-11
Signed-off-by: rl001m <ruilu@research.att.com>
Diffstat (limited to 'conductor/examples/distribution/ubuntu/init/conductor-api.conf')
-rw-r--r-- | conductor/examples/distribution/ubuntu/init/conductor-api.conf | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/conductor/examples/distribution/ubuntu/init/conductor-api.conf b/conductor/examples/distribution/ubuntu/init/conductor-api.conf new file mode 100644 index 0000000..f6f805e --- /dev/null +++ b/conductor/examples/distribution/ubuntu/init/conductor-api.conf @@ -0,0 +1,37 @@ +description "Conductor API" +author "Joe D'Andrea <jdandrea@research.att.com>" + +env PYTHON_HOME= +env PORT=8091 + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +respawn +limit nofile 65535 65535 + +pre-start script + for i in lock run log lib ; do + mkdir -p /var/$i/conductor + chown conductor:conductor /var/$i/conductor + done +end script + +script + DAEMON="/usr/bin/conductor-api" + [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-api" + [ -x "$DAEMON" ] || exit 0 + DAEMON_ARGS="" + [ -r /etc/default/openstack ] && . /etc/default/openstack + [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB + [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog" + [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/conductor/conductor-api.log" + + exec start-stop-daemon --start --chdir /var/lib/conductor \ + --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-engine.pid \ + --exec $DAEMON -- --port $PORT -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS} +end script + + |