nessus-tool/rc.nessus

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
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@102 1 #!@l_prefix@/bin/openpkg rc
michael@102 2 ##
michael@102 3 ## rc.nessus -- Run-Commands
michael@102 4 ##
michael@102 5
michael@102 6 %config
michael@102 7 nessus_enable="$openpkg_rc_def"
michael@102 8 nessus_listen_addr="127.0.0.1"
michael@102 9 nessus_listen_port="1241"
michael@102 10 nessus_source_addr="127.0.0.1"
michael@102 11 nessus_log_prolog="true"
michael@102 12 nessus_log_epilog="true"
michael@102 13 nessus_log_numfiles="10"
michael@102 14 nessus_log_minsize="1M"
michael@102 15 nessus_log_complevel="9"
michael@102 16
michael@102 17 %common
michael@102 18 nessus_pidfile="@l_prefix@/var/nessus/nessusd.pid"
michael@102 19 nessus_signal () {
michael@102 20 [ -f $nessus_pidfile ] && kill -$1 `cat $nessus_pidfile`
michael@102 21 }
michael@102 22
michael@102 23 %status -u @l_susr@ -o
michael@102 24 nessus_usable="unknown"
michael@102 25 nessus_active="no"
michael@102 26 rcService nessus enable yes && \
michael@102 27 nessus_signal 0 && nessus_active="yes"
michael@102 28 echo "nessus_enable=\"$nessus_enable\""
michael@102 29 echo "nessus_usable=\"$nessus_usable\""
michael@102 30 echo "nessus_active=\"$nessus_active\""
michael@102 31
michael@102 32 %start -p 900 -u @l_susr@
michael@102 33 rcService nessus enable yes || exit 0
michael@102 34 rcService nessus active yes && exit 0
michael@102 35 @l_prefix@/sbin/nessusd \
michael@102 36 --listen="${nessus_listen_addr}" \
michael@102 37 --port="${nessus_listen_port}" \
michael@102 38 --src-ip="${nessus_source_addr}" \
michael@102 39 --background
michael@102 40
michael@102 41 %stop -p 100 -u @l_susr@
michael@102 42 rcService nessus enable yes || exit 0
michael@102 43 rcService nessus active no && exit 0
michael@102 44 nessus_signal TERM
michael@102 45 sleep 2
michael@102 46
michael@102 47 %restart -p 900 -u @l_susr@
michael@102 48 rcService nessus enable yes || exit 0
michael@102 49 rcService nessus active no && exit 0
michael@102 50 rc nessus stop start
michael@102 51
michael@102 52 %daily -u @l_susr@
michael@102 53 rcService nessus enable yes || exit 0
michael@102 54 shtool rotate -f \
michael@102 55 -n ${nessus_log_numfiles} -s ${nessus_log_minsize} -d \
michael@102 56 -z ${nessus_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
michael@102 57 -P "${nessus_log_prolog}" \
michael@102 58 -E "${nessus_log_epilog}; rc nessus restart" \
michael@102 59 @l_prefix@/var/nessus/logs/nessusd.log
michael@102 60

mercurial