| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | private function isUnattendedUpgradesUsable(): bool |
||
| 45 | { |
||
| 46 | if (stripos(PHP_OS, 'Linux') === false) { |
||
| 47 | return false; |
||
| 48 | } |
||
| 49 | |||
| 50 | $whichApt = trim(shell_exec('which apt')); |
||
| 51 | if (empty($whichApt)) { |
||
| 52 | return false; |
||
| 53 | } |
||
| 54 | |||
| 55 | return !empty(shell_exec('apt-cache show unattended-upgrades 2>/dev/null')); |
||
| 56 | } |
||
| 58 |