]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #7113 Enable timestamp in tracefile for SD
authorAlain Spineux <alain@baculasystems.com>
Wed, 2 Dec 2020 15:17:54 +0000 (16:17 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/platforms/debian/bacula-sd.in
bacula/platforms/redhat/bacula-sd.in
bacula/platforms/slackware/rc.bacula-sd.in
bacula/platforms/suse/bacula-sd.in
bacula/platforms/suse/bacula.in
bacula/platforms/systemd/bacula-sd.service.in

index 13b726e5cd06bee46488a9cc75b94349c10c6c16..2e693070751368ecc38e55a005ac1539a1031644 100644 (file)
@@ -27,7 +27,7 @@ DESC="@BACULA@ Storage Daemon"
 DAEMON=@sbindir@/${NAME}
 BUSER=@sd_user@
 BGROUP=@sd_group@
-BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BOPTIONS="-dt -c @sysconfdir@/${NAME}.conf"
 BPORT=@sd_port@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
index e8abce3f3a587fe4f81503504b02030ea2117889..0ea509f3f360d22ae4740fa0938a3018ad3dae81 100755 (executable)
@@ -19,7 +19,7 @@ DAEMON_OPTIONS=''
 DAEMON_USER=yes
 SD_USER=@sd_user@
 SD_GROUP=@sd_group@
-SD_OPTIONS=''
+SD_OPTIONS='-dt'
 OS=`uname -s`
 
 # if /lib/tls exists, force Bacula to use the glibc pthreads instead
index ff7a687a223cd6596e341594816fe4ae3e0ec6a0..e9552477d120d2a0468754ac3388a968e4211636 100644 (file)
@@ -21,7 +21,7 @@ case "$1" in
         [ -x ${BACSDBIN}/bacula-sd ] && { 
             sleep 2
             echo -n "Starting the Storage daemon: "
-            OPTIONS=''
+            OPTIONS='-dt'
             if [ "${SD_USER}" != '' ]; then
                OPTIONS="${OPTIONS} -u ${SD_USER}"
             fi
index 0444ff49343ce3b49e75902e4a5b66de0e54cca1..1d68d60be56a7f7bc605a238fb4f752b0207b16c 100755 (executable)
 # this gives us funtion rc_status -v to tell us if we succeed or fail
 . /etc/rc.status
 
+DAEMON_OPTIONS=''
+DAEMON_USER=yes
+SD_USER=@sd_user@
+SD_GROUP=@sd_group@
+SD_OPTIONS='-dt'
+OS=`uname -s`
+
+# pull in any user defined SD_OPTIONS, SD_USER, SD_GROUP or DAEMON_USER
+[ -f /etc/sysconfig/bacula ] && . /etc/sysconfig/bacula
+
 RETVAL=0
 case "$1" in
     start)
index 2bd9685f25871387f9166b4ecd2de28661553e7d..01805d9d5087079552ebe8df1d8748260755f02d 100644 (file)
@@ -182,7 +182,7 @@ failure() {
 case "$1" in
     start)
        echo "Starting the Storage daemon"
-       @sbindir@/bacula-sd $2 -v -c @sysconfdir@//bacula-sd.conf
+       @sbindir@/bacula-sd $2 -dt -v -c @sysconfdir@//bacula-sd.conf
        echo "Starting the File daemon"
        @sbindir@/bacula-fd $2 -v -c @sysconfdir@//bacula-fd.conf
        sleep 2
index ba15a66404e8cb7b1d90b29a9014e06d0fc48f6c..2fb45bf1d5d50dcd2353ce85cbd9157d4f019664 100644 (file)
@@ -24,8 +24,12 @@ RequiresMountsFor=@working_dir@ @sysconfdir@ @sbindir@
 Type=simple
 User=@sd_user@
 Group=@sd_group@
-ExecStart=@sbindir@/bacula-sd -fP -c @sysconfdir@/bacula-sd.conf
-SuccessExitStatus=15
+Environment="LD_LIBRARY_PATH=@libdir@"
+# comment out to get traces working at startup using -T and -d options
+#WorkingDirectory=@working_dir@
+ExecStart=@sbindir@/bacula-sd -dt -c @sysconfdir@/bacula-sd.conf
+StandardError=syslog
+TimeoutStopSec=3min
 LimitMEMLOCK=infinity
 
 [Install]