bacula/rc.bacula

Thu, 08 Jan 2009 18:28:40 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 08 Jan 2009 18:28:40 +0100
changeset 45
d2954f86e9e6
child 247
ee7aae6b6e31
permissions
-rw-r--r--

Depend on sed, grep, and binutils, because libtool hard codes values.
This unfortunate dependency change is necessary because the main
program script calls helper tools from hard coded paths. Please
see /pfx/bin/libtool:77 for the example SED="/pfx/bin/sed".

     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_files="@l_prefix@/var/bacula/log"
    13     bacula_log_prolog="true"
    14     bacula_log_epilog="true"
    15     bacula_log_numfiles="10"
    16     bacula_log_minsize="1M"
    17     bacula_log_complevel="9"
    19 %status -u @l_susr@ -o
    20     bacula_usable="no"
    21     bacula_active="no"
    22     [ ".`@l_prefix@/libexec/bacula/bacula status 2>/dev/null | grep running`" != . ] && bacula_active="yes"
    23     echo "bacula_enable=\"$bacula_enable\""
    24     echo "bacula_usable=\"$bacula_usable\""
    25     echo "bacula_active=\"$bacula_active\""
    27 %start -u @l_susr@
    28     rcService bacula enable yes || exit 0
    29     rcService bacula active yes && exit 0
    30     @l_prefix@/libexec/bacula/bacula start \
    31         "$bacula_debug" $bacula_dir_enable $bacula_sd_enable $bacula_fd_enable
    33 %stop -u @l_susr@
    34     rcService bacula enable yes || exit 0
    35     rcService bacula active no  && exit 0
    36     @l_prefix@/libexec/bacula/bacula stop
    38 %restart -u @l_susr@
    39     rcService bacula enable yes || exit 0
    40     rc bacula stop
    41     sleep 5
    42     rc bacula start
    44 %daily -u @l_susr@
    45     rcService bacula enable yes || exit 0
    46     if [ ".$bacula_log_files" != . ]; then
    47         shtool rotate -f \
    48             -n ${bacula_log_numfiles} -s ${bacula_log_minsize} -d \
    49             -z ${bacula_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 640 \
    50             -P "${bacula_log_prolog}" \
    51             -E "${bacula_log_epilog}" \
    52             $bacula_log_files
    53     fi

mercurial