From 48f2c6854fd11937f21fc6cf409e3eb16ce66958 Mon Sep 17 00:00:00 2001 From: Michele Di Maria Date: Mon, 20 Feb 2012 22:25:13 +0100 Subject: LCDProc: Again on the service start/stop/restart - The Client now runs in background (added a trailing & at the end of the command that runs the client); - Removed the delays in the script during the service stop; - Fixed the "default max states" information when it is not defined explicitally in the advanced configuration. --- config/lcdproc-dev/lcdproc.inc | 4 +--- config/lcdproc-dev/lcdproc.xml | 4 ++-- config/lcdproc-dev/lcdproc_client.php | 6 +++--- config/lcdproc-dev/lcdproc_screens.xml | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) (limited to 'config/lcdproc-dev') diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 4034248d..fc91dd8a 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -503,17 +503,15 @@ while [ `ps auxw |awk '/lcdproc_client.ph[p]/ {print $2}'| wc -l` != 0 ]; do ps auxw |awk '/lcdproc_client.ph[p]/ {print $2}'|xargs kill - sleep 2 done while [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0 ]; do ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill - sleep 2 done EOD; $start = $stop ."\n"; $start .= "\t/usr/bin/nice -20 /usr/local/sbin/LCDd -c ". LCDPROC_CONFIG ."\n"; - $start .= "\t/usr/bin/nice -20 /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php\n"; + $start .= "\t/usr/bin/nice -20 /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php &\n"; /* write out the configuration */ conf_mount_rw(); lcdproc_write_config(LCDPROC_CONFIG, $config_text); diff --git a/config/lcdproc-dev/lcdproc.xml b/config/lcdproc-dev/lcdproc.xml index b077250f..7b59bce0 100644 --- a/config/lcdproc-dev/lcdproc.xml +++ b/config/lcdproc-dev/lcdproc.xml @@ -1,8 +1,8 @@ - Services: LCDproc 0.5.5 pkg v. 0.9.3 + Services: LCDproc 0.5.5 pkg v. 0.9.4 lcdproc - 0.5.5 pkg v. 0.9.3 + 0.5.5 pkg v. 0.9.4 Save /usr/local/pkg/lcdproc.inc diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php index 684a645f..6050b6ca 100644 --- a/config/lcdproc-dev/lcdproc_client.php +++ b/config/lcdproc-dev/lcdproc_client.php @@ -42,15 +42,15 @@ if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0) $maxstates="/{$config['system']['maximumstates']}"; else - $maxstates="/10000"; - + $maxstates="/". pfsense_default_state_size(); + $curentries = `/sbin/pfctl -si |grep current`; if (preg_match("/([0-9]+)/", $curentries, $matches)) { $curentries = $matches[1]; } return $curentries . $maxstates; } - + function disk_usage() { $dfout = ""; exec("/bin/df -h | /usr/bin/grep -w '/' | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d '%' -f 1", $dfout); diff --git a/config/lcdproc-dev/lcdproc_screens.xml b/config/lcdproc-dev/lcdproc_screens.xml index da064e9e..f7c70086 100644 --- a/config/lcdproc-dev/lcdproc_screens.xml +++ b/config/lcdproc-dev/lcdproc_screens.xml @@ -2,7 +2,7 @@ Services: LCDproc: Screens lcdproc_screens - 0.5.5 pkg v. 0.9.3 + 0.5.5 pkg v. 0.9.4 Save /usr/local/pkg/lcdproc.inc -- cgit v1.2.3