Build precise queries to find exactly what you need
Press ESC to close
@wrufeger
Favorites0
Views
Projects0
reading password from etc/psa/.psa.shadow does not work, rest of script updated to work with current plesk and php8: #!/usr/bin/env php xpath('server/get/result/key'); if ($nodes) { foreach ($nodes[0]->property as $n) { if ($n->name == 'lim_date') { $node = $n->value; break; } } } if (empty($node)) { fwrite(STDERR, "UNKNOWN: Could not retrieve license info from server responsen"); exit(NAGIOS_RETURN_UNKNOWN); } $expirationDate = (string) $node[0]; $future = strtotime($expirationDate); $now = strtotime("now"); $diff = $future - $now; $daysToExpire = floor($diff/86400); if ($daysToExpire
Reviewed 1 year ago