Browse Source

ops, these changes from my development queue were not intended to be comitted at this time, so back them out

master
parent
commit
ebe0b9107d
  1. 53
      flowtools/rc.flowtools

53
flowtools/rc.flowtools

@ -5,13 +5,10 @@
%config
flowtools_enable="$openpkg_rc_def"
flowtools_fanout="no"
flowtools_fanout_flags="-S5 -V5"
flowtools_fanout_listen="127.0.0.1/0/4433 0/127.0.0.1/4434 0/127.0.0.1/4435"
flowtools_capture="no"
flowtools_capture_flags="-S5 -V5 -N-1 -n95 -e665 -z4"
flowtools_capture_listen="127.0.0.1/0/4432"
flowtools_capture_flags="-V5 -N-1 -n95 -e665 -z4 -S5"
flowtools_capture_workdir="@l_prefix@/var/flowtools/db"
flowtools_capture_listen="127.0.0.1/0/4432"
flowtools_capture_log_prolog="true"
flowtools_capture_log_epilog="true"
flowtools_capture_log_numfiles="10"
@ -19,12 +16,8 @@
flowtools_capture_log_complevel="9"
%common
flowtools_logfile="@l_prefix@/var/flowtools/flowtools.log"
flowtools_fanout_pidfile="@l_prefix@/var/flowtools/flow-fanout.pid"
flowtools_fanout_signal () {
[ -f $flowtools_fanout_pidfile ] && kill -$1 `cat $flowtools_fanout_pidfile`
}
flowtools_capture_pidfile="@l_prefix@/var/flowtools/flow-capture.pid"
flowtools_capture_logfile="@l_prefix@/var/flowtools/flowtools.log"
flowtools_capture_pidfile="@l_prefix@/var/flowtools/flowtools.pid"
flowtools_capture_signal () {
[ -f $flowtools_capture_pidfile ] && kill -$1 `cat $flowtools_capture_pidfile`
}
@ -32,8 +25,6 @@
%status -u @l_rusr@ -o
flowtools_usable="unknown"
flowtools_active="no"
rcService flowtools enable yes && rcVarIsYes flowtools_fanout && \
flowtools_fanout_signal 0 && flowtools_active="yes"
rcService flowtools enable yes && rcVarIsYes flowtools_capture && \
flowtools_capture_signal 0 && flowtools_active="yes"
echo "flowtools_enable=\"$flowtools_enable\""
@ -43,37 +34,25 @@
%start -u @l_rusr@
rcService flowtools enable yes || exit 0
rcService flowtools active yes && exit 0
if rcVarIsYes flowtools_fanout; then
eval @l_prefix@/bin/flow-fanout \
$flowtools_fanout_flags \
-p "$flowtools_fanout_pidfile" \
"$flowtools_fanout_listen"
fi
if rcVarIsYes flowtools_capture; then
eval @l_prefix@/bin/flow-capture \
$flowtools_capture_flags \
-p "$flowtools_capture_pidfile" \
-w "$flowtools_capture_workdir" \
"$flowtools_capture_listen"
fi
rcVarIsYes flowtools_capture || exit 0
eval @l_prefix@/bin/flow-capture \
$flowtools_capture_flags \
-p "$flowtools_capture_pidfile" \
-w "$flowtools_capture_workdir" \
"$flowtools_capture_listen"
%stop -u @l_rusr@
rcService flowtools enable yes || exit 0
rcService flowtools active no && exit 0
if rcVarIsYes flowtools_fanout; then
flowtools_fanout_signal TERM
sleep 2
rm -f $flowtools_fanout_pidfile
fi
if rcVarIsYes flowtools_capture; then
flowtools_capture_signal TERM
sleep 2
rm -f $flowtools_capture_pidfile
fi
rcVarIsYes flowtools_capture || exit 0
flowtools_capture_signal TERM
sleep 2
rm -f $flowtools_capture_pidfile
%restart -u @l_rusr@
rcService flowtools enable yes || exit 0
rcService flowtools active no && exit 0
rcVarIsYes flowtools_capture || exit 0
rc flowtools stop start
%daily -u @l_rusr@
@ -85,5 +64,5 @@
-z ${flowtools_capture_log_complevel} -m 644 -o @l_rusr@ -g @l_rgrp@ \
-P "${flowtools_capture_log_prolog}" \
-E "${flowtools_capture_log_epilog}; rc flowtools restart" \
$flowtools_logfile
$flowtools_capture_logfile

Loading…
Cancel
Save