aboutsummaryrefslogtreecommitdiffstats
path: root/packages/lcdproc/lcdproc.inc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2008-02-18 14:56:38 +0000
committerSeth Mos <seth.mos@xs4all.nl>2008-02-18 14:56:38 +0000
commite55c4d3f2ba5db052f1173d48f65b33180df04e1 (patch)
treecf397dc3ea0c9a2bfe511e73623ce1cacf77c759 /packages/lcdproc/lcdproc.inc
parent77a78f81a536af730907af14635b961a59c173a5 (diff)
downloadpfsense-packages-e55c4d3f2ba5db052f1173d48f65b33180df04e1.tar.gz
pfsense-packages-e55c4d3f2ba5db052f1173d48f65b33180df04e1.tar.bz2
pfsense-packages-e55c4d3f2ba5db052f1173d48f65b33180df04e1.zip
Fix stop start restart logic
Diffstat (limited to 'packages/lcdproc/lcdproc.inc')
-rw-r--r--packages/lcdproc/lcdproc.inc20
1 files changed, 9 insertions, 11 deletions
diff --git a/packages/lcdproc/lcdproc.inc b/packages/lcdproc/lcdproc.inc
index e1a7b963..59fa6250 100644
--- a/packages/lcdproc/lcdproc.inc
+++ b/packages/lcdproc/lcdproc.inc
@@ -279,8 +279,8 @@ counter=1
while [ "\$counter" -ne 0 ]
do
# start the lcd client, lcdproc client for now until PHP client is finished
- /usr/local/bin/lcdproc -f $options
- #/usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php
+ #/usr/local/bin/lcdproc -f $options
+ /usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php
sleep 10
done
@@ -289,15 +289,13 @@ EOD;
/* generate rc file start and stop */
$stop = <<<EOD
-if [ `pgrep LCDd | wc -l` != 0 ]; then
- /usr/bin/killall LCDd
- /usr/bin/killall lcdclient.sh
- while [ `pgrep LCDd | wc -l` != 0 ]; do
- sleep 1
- done
- while [ `pgrep lcdclient.sh | wc -l` != 0 ]; do
- sleep 1
- done
+if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0 ]; then
+ ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill
+ sleep 1
+fi
+if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0 ]; then
+ ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill
+ sleep 1
fi
EOD;