summaryrefslogtreecommitdiff
path: root/noncore/tools/opie-sh/scripts/hostlist.sh
Side-by-side diff
Diffstat (limited to 'noncore/tools/opie-sh/scripts/hostlist.sh') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/tools/opie-sh/scripts/hostlist.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/tools/opie-sh/scripts/hostlist.sh b/noncore/tools/opie-sh/scripts/hostlist.sh
index 6d70793..d7c94f8 100755
--- a/noncore/tools/opie-sh/scripts/hostlist.sh
+++ b/noncore/tools/opie-sh/scripts/hostlist.sh
@@ -9,53 +9,53 @@
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 20020524-1 - icon to hostlist
# 20020517-1 - added icon, changed name in launcher
#
-CFG=/opt/QtPalmtop/share/config/hostlist.cfg
+CFG=$OPIEDIR/share/config/hostlist.cfg
OPIE_SH=opie-sh
hostlist() {
-( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>"
+( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
echo "<h3>Hostlist</h3><br>"
HOSTLIST=`cat $CFG | grep -v '#'`
for HOST in $HOSTLIST
do
PT=` ping -c 1 $HOST | grep avg|cut -d " " -f4-`
if [ "$PT" != "" ]
then echo "<b><font color=#00ff00> "
echo "$HOST is up<br></font></b>[$PT]<br>"
else echo "<b><font color=#ff0000> "
echo "$HOST is down<br></font></b>[$PT]<br>"
fi
done
) | $OPIE_SH -t "Which are up ?" -f
}
cleanup() {
kill $SCREENCLEAN
rm -f /tmp/qcop-msg-hostlist.sh
}
about() {
- ( echo "<img src=/opt/QtPalmtop/pics/opie-sh-scripts/hostlist.png>"
+ ( echo "<img src=$OPIEDIR/pics/opie-sh-scripts/hostlist.png>"
echo "<h3>About</h3>"
echo "This little App should make it possible for you to "
echo "check some hosts for availability."
echo "<p>"
) | $OPIE_SH -t hostlist -f &
SCREENCLEAN=$!
sleep 1
}
#####################################################################
#
# main