Pandabot/pb-web/inc/botcmd.php

18 lines
446 B
PHP
Executable file

<?php
function botcmd($act) {
switch ($act) {
case "start":
$out=shell_exec("cd ..; ./bot.sh start");
print_r($out);
break;
case "stop":
$out=shell_exec("cd ..; ./bot.sh stop");
print_r($out);
break;
case "restart":
$out=shell_exec("cd ..; ./bot.sh restart");
print_r($out);
break;
} // switch ($act)
} // function end