bacula/rc.bacula

Sat, 03 Oct 2009 16:18:52 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Oct 2009 16:18:52 +0200
changeset 220
a6cd892638c1
child 247
ee7aae6b6e31
permissions
-rw-r--r--

Update version, adjust corresponding buildconf, and correct logic.
1: Make minor corrections and improvements to scripts patch logic.
2: Upgrade to most recent stable release version 3.0.2.
3: Force selection of a single db backend, as multiple ones never
were supported (changing 'with_db<end>' identifiers accordingly.)
4: Unfortunately add gawk requirement although only partly needed.
5: Add openssl::with_threads requirement to solve strange and hard
to debug problems on Solaris leading to connection failures:

'host-dir JobId 0: Error: openssl.c:86 Connect failure: ERR=error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number'

and

'host-dir JobId 40: Fatal error: TLS negotiation failed with FD at "back1.host.com:9102"'

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

mercurial