Patch freeradius.monitrc file so it works out of the box with debian/ubuntu
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Dec 2012 18:57:49 +0000 (18:57 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Dec 2012 19:05:44 +0000 (19:05 +0000)
debian/patches/radiusd-to-freeradius.diff
scripts/freeradius.monitrc [moved from scripts/freeradius.monit with 100% similarity]

index 70c2074..0c05aaa 100644 (file)
@@ -1,8 +1,3 @@
-## 01-radiusd-to-freeradius.dpatch by Mark Hymers <mark@hymers.org.uk>
-## DP: change debian binary name from radiusd -> freeradius
-
-diff --git a/Make.inc.in b/Make.inc.in
-index 854bade..0659351 100644
 --- a/Make.inc.in
 +++ b/Make.inc.in
 @@ -50,7 +50,7 @@ LDFLAGS              = @LDFLAGS@
@@ -14,8 +9,6 @@ index 854bade..0659351 100644
  SBINDIR               = ${sbindir}
  RADIR         = ${radacctdir}
  LIBRADIUS     = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la
-diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
-index 0508300..036e8f5 100644
 --- a/raddb/radiusd.conf.in
 +++ b/raddb/radiusd.conf.in
 @@ -62,7 +62,7 @@ radacctdir = @radacctdir@
@@ -38,3 +31,19 @@ index 0508300..036e8f5 100644
  
        #  Core dumps are a bad thing.  This should only be set to
        #  'yes' if you're debugging a problem with the server.
+--- a/scripts/freeradius.monitrc
++++ b/scripts/freeradius.monitrc
+@@ -8,9 +8,9 @@
+ #  Totalmem limit should be lowered to 200.0 if none of the 
+ #  interpreted language modules or rlm_cache are being used.
+ #
+-check process radiusd with pidfile /var/run/radiusd/radiusd.pid
+-   start program = "/etc/init.d/radiusd start"
+-   stop program = "/etc/init.d/radiusd stop"
++check process freeradius with pidfile /var/run/freeradius/freeradius.pid
++   start program = "/etc/init.d/freeradius start"
++   stop program = "/etc/init.d/freeradius stop"
+    if failed host 127.0.0.1 port 1812 type udp protocol radius secret testing123 then alert
+    if failed host 127.0.0.1 port 1813 type udp protocol radius secret testing123 then alert
+    if cpu > 95% for 2 cycles then alert
+