bacula/rc.bacula

Tue, 28 Aug 2012 18:28:45 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:28:45 +0200
changeset 528
3b08e6396b45
parent 20
8adc5213fd55
permissions
-rw-r--r--

Massively update from 5.1 to 5.5 release, completely changing from
autotools to cmake build configuration along with the corresponding
corrections. Correct some less important problems like typical german
english mistakes, as well as use parallel make for faster builds with
SMP and multicore architectures. Warning, the 5.5 releases of MySQL
seem to be equally bug ridden as the 5.1 are, for example building
the NDBCluster storage engine fails.

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.bacula -- Run-Commands
     4 ##
     6 %config
     7     bacula_enable="$openpkg_rc_def"
     8     bacula_dir_enable="@with_server@"
     9     bacula_sd_enable="@with_server@"
    10     bacula_fd_enable="yes"
    11     bacula_debug=""
    12     bacula_log_dir="@l_prefix@/var/bacula/bacula-dir.log"
    13     bacula_log_fd="@l_prefix@/var/bacula/bacula-fd.log"
    14     bacula_log_sd="@l_prefix@/var/bacula/bacula-sd.log"
    15     bacula_log_prolog="true"
    16     bacula_log_epilog="true"
    17     bacula_log_numfiles="10"
    18     bacula_log_minsize="1M"
    19     bacula_log_complevel="9"
    21 %status -u @l_susr@ -o
    22     bacula_usable="no"
    23     bacula_active="no"
    24     [ ".`@l_prefix@/libexec/bacula/bacula status 2>/dev/null | grep running`" != . ] && bacula_active="yes"
    25     echo "bacula_enable=\"$bacula_enable\""
    26     echo "bacula_usable=\"$bacula_usable\""
    27     echo "bacula_active=\"$bacula_active\""
    29 %start -u @l_susr@
    30     rcService bacula enable yes || exit 0
    31     rcService bacula active yes && exit 0
    32     @l_prefix@/libexec/bacula/bacula start \
    33         "$bacula_debug" $bacula_dir_enable $bacula_sd_enable $bacula_fd_enable
    35 %stop -u @l_susr@
    36     rcService bacula enable yes || exit 0
    37     rcService bacula active no  && exit 0
    38     @l_prefix@/libexec/bacula/bacula stop
    40 %restart -u @l_susr@
    41     rcService bacula enable yes || exit 0
    42     rc bacula stop
    43     sleep 5
    44     rc bacula start
    46 %daily -u @l_susr@
    47     rcService bacula enable yes || exit 0
    48     for logfile in $bacula_log_dir $bacula_log_fd $bacula_log_sd; do
    49         shtool rotate -f \
    50             -n ${bacula_log_numfiles} -s ${bacula_log_minsize} -d \
    51             -z ${bacula_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 640 \
    52             -P "${bacula_log_prolog}" \
    53             -E "${bacula_log_epilog}" \
    54             $logfile
    55     done

mercurial