DESC="OpenStack Cinder Api"
NAME=cinder-api
DAEMON=/usr/bin/cinder-api
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-api.log"
+DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CINDER_USER=cinder
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/cinder/cinder-api.log"
+
do_start(){
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
|| return 1
chown cinder:root /var/lock/cinder
end script
-exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-api \
- -- --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-api.log
+script
+ [ -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/cinder/$UPSTART_JOB.log"
+
+ exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-api -- \
+ --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
+end script
DESC="OpenStack Cinder Backup"
NAME=cinder-backup
DAEMON=/usr/bin/cinder-backup
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-backup.log"
+DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CINDER_USER=cinder
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/cinder/cinder-backup.log"
+
do_start() {
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
|| return 1
chown cinder:root /var/lock/cinder
end script
-exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-backup \
- -- --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-backup.log
+script
+ [ -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/cinder/$UPSTART_JOB.log"
+
+ exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-backup -- \
+ --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
+end script
DESC="OpenStack Cinder Scheduler"
NAME=cinder-scheduler
DAEMON=/usr/bin/cinder-scheduler
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-scheduler.log"
+DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CINDER_USER=cinder
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/cinder/cinder-scheduler.log"
+
do_start() {
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
|| return 1
chown cinder:root /var/lock/cinder
end script
-exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-scheduler \
- -- --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-scheduler.log
+script
+ [ -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/cinder/$UPSTART_JOB.log"
+
+ exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-scheduler -- \
+ --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
+end script
DESC="OpenStack Cinder Volume"
NAME=cinder-volume
DAEMON=/usr/bin/cinder-volume
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-volume.log"
+DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CINDER_USER=cinder
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/cinder/cinder-volume.log"
+
do_start() {
start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
|| return 1
chown cinder:root /var/lock/cinder
end script
-exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-volume \
- -- --config-file=/etc/cinder/cinder.conf --log-file=/var/log/cinder/cinder-volume.log
+script
+ [ -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/cinder/$UPSTART_JOB.log"
+
+ exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-volume -- \
+ --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
+end script