]> git.pld-linux.org Git - packages/PowerChutePlus.git/blame - PowerChutePlus-xpowerchute.sh
- adapterized
[packages/PowerChutePlus.git] / PowerChutePlus-xpowerchute.sh
CommitLineData
ec1d83db
JR
1#!/bin/sh
2# @(#)xpowerchute 1.12
3# Copyright 1992, American Power Conversion, Inc.
4#
5
6PWRCHUTE=/usr/lib/powerchute
7export PWRCHUTE
8
9# we need to determine if powerchute is running
10# and if it is, are we in local or network mode?
11
12if [ "`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
23else
24 # powerchute is not running. Go ahead and launch it.
25 exec $PWRCHUTE/_xpwrchute
26fi
This page took 0.075255 seconds and 4 git commands to generate.