nessus-tool/rc.nessus

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

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