Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
More service check
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jul 13, 2021
1 parent 971a9eb commit b12fabb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/status/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ function stripFirstLine($text)

# services
$check = [
'iptables', 'ip6tables', 'mariadb', 'named', 'nginx',
'php-fpm', 'postgresql', 'proftpd', 'sshd', 'webmin'
'nginx', 'named',
'iptables', 'ip6tables',
'mariadb', 'postgresql',
'php-fpm', 'php56-fpm', 'php80-fpm',
'proftpd', 'sshd', 'webmin', 'do-agent',
];
$services = [];
foreach ($check as $s) {
$services[$s] = rtrim(shell_exec("systemctl is-active $s"));
if ($services[$s] !== 'active') {
if ($services[$s] === 'failed') {
$error = 1;
}
}
Expand Down

0 comments on commit b12fabb

Please sign in to comment.