[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sudo-users
Subject:    [sudo-users] Code:
From:       Benjamin Johann <b.johann () web ! de>
Date:       2004-09-13 13:52:52
Message-ID: 4145A634.7020206 () web ! de
[Download RAW message or body]

Thanks for the idea to use cat. I will try it out tomorrow evening. Here 
is the code i am using. (maybe not exact)

PHP:
if $command == "verbinden"
    passthru("echo 1 > /tmp/$_SERVER[REMOTE_IP]");

if $command == "trennen"
    passthru("echo 0 > /tmp/$_SERVER[REMOTE_IP]");

passthru("sudo /usr/bin/online.sh");




SCRIPT /usr/bin/online.sh:
#!/bin/bash
$andre='more /tmp/192.168.0.1'
$roman='more /tmp/192.168.0.2'

if [ $roman = "0" ] ; then
echo "Roman ist offline"
else
echo "Roman ist online"
fi

if [ $andre = "0" ] ; then
echo "Andre ist offline"
else
echo "Andre ist online"
fi

if [ $andre = "0"] ||[$roman = "0" ] ; then
gooffline
else
goonline
fi


Ben



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic