summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/tacker/files/tacker.conf
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/tacker/files/tacker.conf')
-rw-r--r--deploy/adapters/ansible/roles/tacker/files/tacker.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/tacker/files/tacker.conf b/deploy/adapters/ansible/roles/tacker/files/tacker.conf
new file mode 100644
index 00000000..0c90dcb9
--- /dev/null
+++ b/deploy/adapters/ansible/roles/tacker/files/tacker.conf
@@ -0,0 +1,36 @@
+description "OpenStack Tacker Server"
+author "Yifei Xue <xueyifei@huawei.com>"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+chdir /var/run
+
+respawn
+respawn limit 20 5
+limit nofile 65535 65535
+
+pre-start script
+ for i in lock run log lib ; do
+ mkdir -p /var/$i/tacker
+ chown root /var/$i/tacker
+ done
+end script
+
+script
+ [ -x "/usr/local/bin/tacker-server" ] || exit 0
+ DAEMON_ARGS=""
+ CONFIG_FILE="/usr/local/etc/tacker/tacker.conf"
+ USE_SYSLOG=""
+ USE_LOGFILE=""
+ NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG=""
+ [ -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/tacker/tacker.log"
+ [ -z "$NO_OPENSTACK_CONFIG_FILE_DAEMON_ARG" ] && DAEMON_ARGS="$DAEMON_ARGS --config-file=$CONFIG_FILE"
+
+ exec start-stop-daemon --start --chdir /var/lib/tacker \
+ --chuid root:root --make-pidfile --pidfile /var/run/tacker/tacker.pid \
+ --exec /usr/local/bin/tacker-server -- ${DAEMON_ARGS}
+end script