]> git.pld-linux.org Git - packages/PowerChutePlus.git/blob - PowerChutePlus-xpowerchute.sh
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
[packages/PowerChutePlus.git] / PowerChutePlus-xpowerchute.sh
1 #!/bin/sh
2 # @(#)xpowerchute       1.12
3 #         Copyright 1992, American Power Conversion, Inc.
4 #
5
6 PWRCHUTE=/usr/lib/powerchute
7 export PWRCHUTE
8
9 # we need to determine if powerchute is running
10 # and if it is, are we in local or network mode?
11
12 if [ "`ps ax | grep pwrchu | grep -v grep 2>/dev/null`" != "" ]; then
13         #powerchute is running
14         #check to see if usetcp is set to no
15
16         if grep -iqs "usetcp.*no" /etc/powerchute.ini >/dev/null 2>/dev/null; then
17                 # usetcp is set to no.
18                 echo "Can't run more than one version of "
19                 echo "PowerChute Client in Local Mode."
20         else
21                 exec $PWRCHUTE/_xpwrchute
22         fi
23 else
24         # powerchute is not running.  Go ahead and launch it.
25         exec $PWRCHUTE/_xpwrchute
26 fi
This page took 0.069615 seconds and 3 git commands to generate.