[sudo-users] executing shell-script with sudo in php

Benjamin Johann b.johann at web.de
Mon Sep 13 07:45:50 EDT 2004


Help!
I am starting a shell-script with sudo in php. I get a error that if


#!/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


  -> [ too many arguments (repeated 3 times)

Running my shell-script in a terminal there is no fault.
Knows somebody why?
Benni





More information about the sudo-users mailing list