@@ -124,13 +124,17 @@ |
||
124 | 124 | $command = "systemctl list-units --type=service --all --no-legend --no-pager | awk '{printf \"%s|%s|%s|%s|\", \$1, \$2, \$3, \$4; for (i=5; i<=NF; i++) printf \$i \" \"; print \"\"}'"; |
125 | 125 | |
126 | 126 | $output = shell_exec($command); |
127 | - if ($output === null) return []; |
|
127 | + if ($output === null) { |
|
128 | + return []; |
|
129 | + } |
|
128 | 130 | |
129 | 131 | $lines = explode("\n", trim($output)); |
130 | 132 | $services = []; |
131 | 133 | |
132 | 134 | foreach ($lines as $line) { |
133 | - if (empty($line)) continue; |
|
135 | + if (empty($line)) { |
|
136 | + continue; |
|
137 | + } |
|
134 | 138 | $parts = explode('|', $line); |
135 | 139 | |
136 | 140 | if (count($parts) >= 5) { |