1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/plugin/YPTSocket/serverRestart.php
2022-03-17 11:43:59 -03:00

18 lines
No EOL
476 B
PHP

<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/YPTSocket/functions.php';
if (!isCommandLineInterface()) {
die("Command line only");
}
ob_end_flush();
$force = @$argv[1];
echo 'Restart socket server' . PHP_EOL;
if($force == 'force'){
echo 'Kill it if need' . PHP_EOL;
restartServer();
}else{
echo 'Do not kill if is running' . PHP_EOL;
restartServerIfIsDead();
}