Hi All,
I am a newly registered member and new to php and linux!
I'm having problems with a script that starts the 'mobinterface' at system startup on suse 9.1.
I want to run a 'mobinterface' every time the system starts.
This is what i have done:
I added "/usr/local/bin/mobinterface_start" to the 'boot.local' file. I added both 'mobinterface' and 'mobinterface_start' to the directory "/usr/local/bin/" (like so:/usr/local/bin/mobinterface and /usr/local/bin/mobinterface_start).
This is what i have in the 'mobinterface_start':
code:
#!/bin/bash
mobinterface should be in PATH eg:/usr/bin or /usr/local/bin
fixing PATH to hold it
export PATH=/usr/bin:/usr/local/bin:$PATH
mobinterface &
And in the 'mobinterface':
code:
#!/bin/bash
PHP_BIN="/usr/bin/php";
DAEMON="/home/mobinterface/public_html/daemon.php";
COMMAND="$PHP_BIN -q $DAEMON"
RETURN=$COMMAND
if [ $RETURN != "REFRESHED" ]; then
echo "PHP binary does not execute daemon correctly"
exit 1
fi
while true
do
$COMMAND >/dev/null 2>&1
sleep 20s
done
The problem is that the system returns an error at startup:
/usr/local/bin/mobinterface:line 10 [ too many arguments
Any suggestions on the above error plz?
Thanks in advance for your reply.
regards;
sybella