1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/plugin/YPTSocket/serverCertbot.php
2023-10-16 17:58:47 -03:00

26 lines
760 B
PHP

<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use Socket\Message;
//use React\Socket\Server as Reactor;
require_once dirname(__FILE__) . '/../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/YPTSocket/Message.php';
require_once $global['systemRootPath'] . 'objects/autoload.php';
if (!isCommandLineInterface()) {
die("Command line only");
}
$SocketDataObj = AVideoPlugin::getDataObject("YPTSocket");
$SocketDataObj->serverVersion = YPTSocket::getServerVersion();
ob_end_flush();
_mysql_close();
_session_write_close();
killProcessOnPort();
exec('certbot renew');
exec("sudo nohup php {$global['systemRootPath']}plugin/YPTSocket/server.php &");