Fix Cron Router check, go to cache instead uploads folder. and check if Mikrotik using Default port
This commit is contained in:
parent
9772760146
commit
d31274b983
@ -82,10 +82,10 @@ foreach ($d as $ds) {
|
|||||||
|
|
||||||
if ($config['router_check']) {
|
if ($config['router_check']) {
|
||||||
|
|
||||||
$lockFile = '../system/uploads/router_monitor.lock';
|
$lockFile = $CACHE_PATH . '/router_monitor.lock';
|
||||||
|
|
||||||
if (!is_dir('../system/uploads/')) {
|
if (!is_dir($CACHE_PATH)) {
|
||||||
echo "Directory '/system/uploads/' does not exist. Exiting...\n";
|
echo "Directory '$CACHE_PATH' does not exist. Exiting...\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,13 @@ if ($config['router_check']) {
|
|||||||
$errors = [];
|
$errors = [];
|
||||||
|
|
||||||
foreach ($routers as $router) {
|
foreach ($routers as $router) {
|
||||||
|
// check if custom port
|
||||||
|
if (strpos($router->ip_address, ':') === false){
|
||||||
|
$ip = $router->ip_address;
|
||||||
|
$port = 8728;
|
||||||
|
} else {
|
||||||
[$ip, $port] = explode(':', $router->ip_address);
|
[$ip, $port] = explode(':', $router->ip_address);
|
||||||
|
}
|
||||||
$isOnline = false;
|
$isOnline = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user