From: Eric Bollengier Date: Wed, 20 Oct 2010 08:35:50 +0000 (+0200) Subject: Fix ubuntu/debian startup scripts X-Git-Tag: Release-5.2.1~1017 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=da58a9b3ac5b373a0f9b10e468e4605d338b7f15;p=bacula%2Fbacula Fix ubuntu/debian startup scripts --- diff --git a/bacula/platforms/debian/bacula-dir.in b/bacula/platforms/debian/bacula-dir.in index 5764f8d214..1a1d7cb34f 100644 --- a/bacula/platforms/debian/bacula-dir.in +++ b/bacula/platforms/debian/bacula-dir.in @@ -24,7 +24,7 @@ DESC="@BACULA@ Director" DAEMON=@sbindir@/${NAME} BUSER=@dir_user@ BGROUP=@dir_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@dir_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -40,20 +40,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; diff --git a/bacula/platforms/debian/bacula-fd.in b/bacula/platforms/debian/bacula-fd.in index 8f81442337..93cf0f81c6 100644 --- a/bacula/platforms/debian/bacula-fd.in +++ b/bacula/platforms/debian/bacula-fd.in @@ -24,7 +24,7 @@ DESC="@BACULA@ File Daemon" DAEMON=@sbindir@/${NAME} BUSER=@fd_user@ BGROUP=@fd_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@fd_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -40,20 +40,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; diff --git a/bacula/platforms/debian/bacula-sd.in b/bacula/platforms/debian/bacula-sd.in index 0f2ab9b5f6..fd5b7e809c 100644 --- a/bacula/platforms/debian/bacula-sd.in +++ b/bacula/platforms/debian/bacula-sd.in @@ -24,7 +24,7 @@ DESC="@BACULA@ Storage Daemon" DAEMON=@sbindir@/${NAME} BUSER=@sd_user@ BGROUP=@sd_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@sd_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -40,20 +40,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; diff --git a/bacula/platforms/ubuntu/bacula-dir.in b/bacula/platforms/ubuntu/bacula-dir.in index 5c9ac5f40b..5b460a2e97 100644 --- a/bacula/platforms/ubuntu/bacula-dir.in +++ b/bacula/platforms/ubuntu/bacula-dir.in @@ -25,7 +25,7 @@ DESC="Bacula Director" DAEMON=@sbindir@/${NAME} BUSER=@dir_user@ BGROUP=@dir_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@dir_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -48,20 +48,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} ${USERGRP} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; diff --git a/bacula/platforms/ubuntu/bacula-fd.in b/bacula/platforms/ubuntu/bacula-fd.in index 1f260c7a10..49510f3ff6 100644 --- a/bacula/platforms/ubuntu/bacula-fd.in +++ b/bacula/platforms/ubuntu/bacula-fd.in @@ -25,7 +25,7 @@ DESC="Bacula File Daemon" DAEMON=@sbindir@/${NAME} BUSER=@fd_user@ BGROUP=@fd_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@fd_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -48,20 +48,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; diff --git a/bacula/platforms/ubuntu/bacula-sd.in b/bacula/platforms/ubuntu/bacula-sd.in index ff1de0a7b7..46b48d7aa0 100644 --- a/bacula/platforms/ubuntu/bacula-sd.in +++ b/bacula/platforms/ubuntu/bacula-sd.in @@ -25,7 +25,7 @@ DESC="Bacula Storage Daemon" DAEMON=@sbindir@/${NAME} BUSER=@sd_user@ BGROUP=@sd_group@ -USERGRP="-c @sysconfdir@/${NAME}.conf" +BOPTIONS="-c @sysconfdir@/${NAME}.conf" BPORT=@sd_port@ PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -48,20 +48,20 @@ PIDFILE=@piddir@/${NAME}.${BPORT}.pid if [ "x${BUSER}" != "x" ]; then USERGRP="--chuid ${BUSER}" if [ "x${BGROUP}" != "x" ]; then - USERGRP="${BOPTIONS}:${BGROUP}" + USERGRP="${USERGRP}:${BGROUP}" fi fi case "$1" in start) echo -n "Starting ${DESC}: " - start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} + start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;; stop) echo -n "Stopping ${DESC}: " - start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} + start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS} RETVAL=$? echo "${NAME}" ;;