]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix ubuntu/debian startup scripts
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 20 Oct 2010 08:35:50 +0000 (10:35 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 20 Oct 2010 08:36:05 +0000 (10:36 +0200)
bacula/platforms/debian/bacula-dir.in
bacula/platforms/debian/bacula-fd.in
bacula/platforms/debian/bacula-sd.in
bacula/platforms/ubuntu/bacula-dir.in
bacula/platforms/ubuntu/bacula-fd.in
bacula/platforms/ubuntu/bacula-sd.in

index 5764f8d214503a8fd130a648b39142c6d10cdb79..1a1d7cb34f961e0f5f836f998ea73d6693798a5a 100644 (file)
@@ -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}"
       ;;
index 8f81442337cf67540b8d3cfe781b98e13232e818..93cf0f81c60eadeff22056e59a0d5151ff0002cc 100644 (file)
@@ -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}"
       ;;
index 0f2ab9b5f69e60a8254478291bed0c4749f38188..fd5b7e809c7145303b00d97474a747995c66ba0c 100644 (file)
@@ -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}"
       ;;
index 5c9ac5f40be14b8fa4fe4e06edea48fac94d2975..5b460a2e97e4a5574eaa7dd7d18a6a7a9f8b2644 100644 (file)
@@ -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}"
       ;;
index 1f260c7a104d35e4ad0f3b6870f34bc505a7e09c..49510f3ff6340a6afa778899ea02dc6b427e46a9 100644 (file)
@@ -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}"
       ;;
index ff1de0a7b7236fda4dfd503ff29cb921088c4488..46b48d7aa043125235128f4cb164620e9eaf5673 100644 (file)
@@ -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}"
       ;;