mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Pretty output for statuscheck.php via GET #775
This commit is contained in:
parent
cf27ae7e9d
commit
4fb084b67d
@ -45,12 +45,11 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
$timelimit = 600;
|
||||
}
|
||||
|
||||
$args = array();
|
||||
$checkTypesOfServer = array('gs', 'vs', 'vh', 'my', 'st');
|
||||
|
||||
if (isset($argv)) {
|
||||
|
||||
$args = array();
|
||||
|
||||
foreach ($argv as $a) {
|
||||
if (in_array($a, $checkTypesOfServer)) {
|
||||
$checkTypeOfServer = $a;
|
||||
@ -113,6 +112,10 @@ $query->execute();
|
||||
|
||||
if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip, ipstoarray($rSA['cronjob_ips']))) {
|
||||
|
||||
if (isset($ip)) {
|
||||
echo '<pre>';
|
||||
}
|
||||
|
||||
if (isset($checkTypeOfServer)) {
|
||||
if ($checkTypeOfServer == 'gs') {
|
||||
print 'Checking Gameserver' . "\r\n";
|
||||
@ -699,6 +702,10 @@ if (!isset($ip) or $ui->escaped('SERVER_ADDR', 'server') == $ip or in_array($ip,
|
||||
|
||||
$ssh2cmd = $folders . 'function r () { if [ "`ps fx | grep ' . $tsdnsbin . ' | grep -v grep`" == "" ]; then ./' . $tsdnsbin . ' > /dev/null & else ./' . $tsdnsbin . ' --update > /dev/null & fi }; r& ';
|
||||
|
||||
if ((isset($args['tsDebug']) and $args['tsDebug'] == 1)) {
|
||||
print "$ssh2cmd\r\n";
|
||||
}
|
||||
|
||||
if (ssh2_execute('vd', $row['id'], $ssh2cmd)) {
|
||||
print "Restarting TSDNS: {$row['ssh2ip']}\r\n";
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user