diff options
author | Will Andrews <will@FreeBSD.org> | 2001-12-19 02:30:02 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2001-12-19 02:30:02 +0000 |
commit | 7765c3d3500ff8050f20d17e9bf6dbc16e426d99 (patch) | |
tree | 2a576321bfa1f5eb7c8acbfbea468c2e52446f4a /net/icradius/files/patch-scripts::radwatch | |
parent | Add p5-IC-Radius 0.4, a Perl5 extension for ICRADIUS Interface Module. (diff) |
Add icradius 0.18.1, a variant of Cistron RADIUS, but with a MySQL
backend.
PR: 29080
Submitted by: Sergey N. Voronkov <serg@tmn.ru>
Notes
Notes:
svn path=/head/; revision=51767
Diffstat (limited to 'net/icradius/files/patch-scripts::radwatch')
-rw-r--r-- | net/icradius/files/patch-scripts::radwatch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/net/icradius/files/patch-scripts::radwatch b/net/icradius/files/patch-scripts::radwatch new file mode 100644 index 000000000000..830beb181081 --- /dev/null +++ b/net/icradius/files/patch-scripts::radwatch @@ -0,0 +1,55 @@ +--- scripts/radwatch.orig Sat Jun 9 02:02:03 2001 ++++ scripts/radwatch Thu Jul 5 16:00:31 2001 +@@ -8,9 +8,9 @@ + # + + RWLOG="/var/log/radwatch.log" # Use "/dev/null" for no logging +-RWCMD="/usr/local/sbin/radiusd -y" # Path to radiusd + run-time arguments +-RWRCP="foo@bar.com" # Recipient for alerts. Comment out to disable +-RWINT=10 # Time in seconds between process list polls ++RWCMD="%%PREFIX%%/sbin/radiusd" # Path to radiusd + run-time arguments ++#RWRCP="foo@bar.com" # Recipient for alerts. Comment out to disable ++RWINT=8 # Time in seconds between process list polls + + UNAME=`uname` + +@@ -35,7 +35,16 @@ + ;; + esac + ++# get the path to the radiusd ++if [ "$1" ] && [ -x "$1" ] ++then ++ RWCMD=$1 ++ shift ++fi ++ + ( ++trap "" HUP TSTP ++ + while : + do + +@@ -54,16 +63,21 @@ + fi + + if [ $COUNT -lt 2 ]; then ++ sleep 3 + STAMP=`date "+%m/%d/%y %H:%M:%S"` + ALERT="$COUNT processes. Restarting ICRADIUS." + echo "$STAMP `basename $0`: $ALERT" >> $RWLOG + if [ "$RWRCP" != "" ]; then + echo "`basename $0`: $ALERT" | mail -s "ICRADIUS Restarted" $RWRCP + fi +- kill $PIDS 2>/dev/null; $RWCMD ++ kill $PIDS 2>/dev/null; $RWCMD $* + fi + + sleep $RWINT + + done + ) & ++ ++echo "$!" > /var/run/radwatch.pid ++ ++sleep 1 |