Hello, first I thank anyone who try to get me up of this Q.
I have a script to start/stop a prog ( /usr/bin/Pro.d1) this script locate in /var/script1.sh.
Code:
#!/bin/sh
PRONAME="MyPro"
start_pro ()
{
/usr/bin/Pro.d1 &
sleep 2
}
# This method stops MyPro
stop_pro ()
{
killall Pro.d1
}
case "$1" in
start)
echo "[SCRIPT] $1: $PRONAME"
start_pro
;;
stop)
echo "[SCRIPT] $1: $PRONAME"
stop_pro
;;
restart)
echo "Restaring $PRONAME"
stop_pro
start_pro
;;
*)
"$0" stop
exit 1
;;
esac
exit 0
what I want is a PHP file (eg: index.php) that will execute the /var/script1.sh
I try one :
Code:
<?php
$return = exec("/var/script1.sh");
echo "Executing Status: $return";
?>
but Unfortunately the file wouldn't run or maybe the exec() was disabled.
Any ideas
Thanks