Skip to content

Commit

Permalink
apt: Add a bit more check for update
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinCG committed Aug 20, 2021
1 parent 7a70f1e commit 49e14e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/apt.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
$update_before_check = false;
// If requested in config, update apt (getting latest infos from apt server) before doing an apt-check
// WARNING (security potential issue): sudo apt-get will then need to be allowed for www-data user
if ($Config->get($optionalUpdateKey) == true) {
if ($Config->get($optionalUpdateKey) == true && $apt_get_path != '' && file_exists($apt_get_path) && is_executable($apt_get_path)) {
$updateCommand = 'sudo ' . $apt_get_path . ' -q -y update';
$execresult = exec($updateCommand, $output, $retval);
if ( $retval != 0 ) {
Expand Down

0 comments on commit 49e14e0

Please sign in to comment.