From c6bc5c7ce679665ee88f034382c3db5b2a99cebb Mon Sep 17 00:00:00 2001 From: C-Duv Date: Mon, 30 Jul 2012 18:13:53 +0300 Subject: [PATCH] Make the php_apc.php script's URL configurable I've made the "URL" parameter look up if not already defined (in munin-node configuration file) before defaulting to http://localhost/php_apc.php. --- plugins/php/php_apc_ | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/php/php_apc_ b/plugins/php/php_apc_ index a849e1de..65d464f4 100755 --- a/plugins/php/php_apc_ +++ b/plugins/php/php_apc_ @@ -10,12 +10,14 @@ ################################################################# # # Configuration section +# +# Configuration example +# +# [php_apc_*] +# user root +# env.URL http://localhost/php_apc.php # URL to fetch APC status # -# URL to the script to check apc status -URL="" -#URL="http://localhost/php_apc.php"; -# -# php file included in package +# (php_apc.php file included in package) # ################################################################# # @@ -28,6 +30,10 @@ URL="" #%# family=auto #%# capabilities=autoconf suggest +# URL to the script to check APC status (defaults to +# 'http://localhost/php_apc.php' if not configured) +URL=${URL:-'http://localhost/php_apc.php'} + WGET=`which wget`; WGET_FLAGS="-Yoff"; # refer to wget manual, you may set extra parameters like disable proxy act=`basename $0 | sed 's/^php_apc_//g'`