Location: PHPKode > projects > Axis Groupware > musiclib/unused/tunez/admin_daemon.php
<?
include ("tunez.inc.php");
include ("tunez_admin.inc.php");




if ($action == "start")
{
	$title = "Starting daemon";
}
if ($action == "stop")
{
	$title = "Stopping daemon";
}

include ("header.inc.php");

if ($action == "start")
{
    if ($mode == "local")
    {
//        system("nohup ./tunezd &");
        #exec("./tunezd & >/dev/null 2>/dev/null");
        exec("./detach ./tunezd");

    }
    else
    {
        system("./tunezd -s &");
    }

	showBox ("Doing Stuff", "Hoped it work :)");

}

if ($action == "stop")
{
    system("killall tunezd");
    $kweerie = "DELETE FROM np";
    $result=mysql_db_query("tunez",$kweerie);
	showBox ("Doing Stuff", "Hoped it work :)");

}

include ("footer.inc.php");
?>
Return current item: Axis Groupware