summaryrefslogtreecommitdiffstats
path: root/conductor/examples/distribution/ubuntu/init/conductor-controller.conf
diff options
context:
space:
mode:
authorShankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com>2017-12-17 15:39:38 +0000
committerGerrit Code Review <gerrit@onap.org>2017-12-17 15:39:38 +0000
commiteef6fd68695c7b89548a622412067b8641e0dc77 (patch)
tree101e86853e84d6a8c13a606e54a36f830789364e /conductor/examples/distribution/ubuntu/init/conductor-controller.conf
parentb40db10c6adc205d6dc2a4512d37445089cf4e47 (diff)
parent710d958a29198b6633236c1b7cad12babfe46833 (diff)
Merge "Added all common modules in conductor directory"
Diffstat (limited to 'conductor/examples/distribution/ubuntu/init/conductor-controller.conf')
-rw-r--r--conductor/examples/distribution/ubuntu/init/conductor-controller.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/conductor/examples/distribution/ubuntu/init/conductor-controller.conf b/conductor/examples/distribution/ubuntu/init/conductor-controller.conf
new file mode 100644
index 0000000..9d44be2
--- /dev/null
+++ b/conductor/examples/distribution/ubuntu/init/conductor-controller.conf
@@ -0,0 +1,36 @@
+description "Conductor Controller"
+author "Joe D'Andrea <jdandrea@research.att.com>"
+
+env PYTHON_HOME=
+
+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 /var/$i/conductor
+ done
+end script
+
+script
+ DAEMON="/usr/bin/conductor-controller"
+ [ -d "$PYTHON_HOME" ] && DAEMON="$PYTHON_HOME/bin/conductor-controller"
+ [ -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-controller.log"
+
+ exec start-stop-daemon --start --chdir /var/lib/conductor \
+ --chuid conductor:conductor --make-pidfile --pidfile /var/run/conductor/conductor-controller.pid \
+ --exec $DAEMON -- --config-file=/etc/conductor/conductor.conf ${DAEMON_ARGS}
+end script
+
+