bacula/rc.bacula

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 20
8adc5213fd55
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

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

mercurial