Skip to content

Commit c2419b0

Browse files
author
Marius Cramer
committed
- prevent failure of update check on debian system (on running dpkg process)
1 parent fc0edb2 commit c2419b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/classes/cron.d/100-monitor_system_update.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function onRunJob() {
8282
* Then test the upgrade.
8383
* if there is any output, then there is a needed update
8484
*/
85-
$aptData = shell_exec('apt-get -s -qq dist-upgrade');
85+
$aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
8686
if ($aptData == '') {
8787
/* There is nothing to update! */
8888
$state = 'ok';

0 commit comments

Comments
 (0)