Skip to content
Snippets Groups Projects
Commit c2419b0e authored by Marius Cramer's avatar Marius Cramer
Browse files

- prevent failure of update check on debian system (on running dpkg process)

parent fc0edb2f
No related branches found
No related tags found
No related merge requests found
...@@ -82,7 +82,7 @@ class cronjob_monitor_system_update extends cronjob { ...@@ -82,7 +82,7 @@ class cronjob_monitor_system_update extends cronjob {
* Then test the upgrade. * Then test the upgrade.
* if there is any output, then there is a needed update * if there is any output, then there is a needed update
*/ */
$aptData = shell_exec('apt-get -s -qq dist-upgrade'); $aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
if ($aptData == '') { if ($aptData == '') {
/* There is nothing to update! */ /* There is nothing to update! */
$state = 'ok'; $state = 'ok';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment