File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
server/lib/classes/cron.d Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ public function onRunJob() {
159159 * Fetch the output
160160 */
161161 $ data ['output ' ] = shell_exec ('zypper lu ' );
162+
162163 } elseif (file_exists ('/etc/redhat-release ' )) {
163164 /*
164165 * update and find the upgrade.
@@ -168,13 +169,14 @@ public function onRunJob() {
168169 /* try to figure out the default package manager first */
169170 if (file_exists ('/usr/bin/dnf ' ) && (is_link ('/usr/bin/yum ' ))) {
170171 $ rhPkgMgr = 'dnf ' ;
171- } elseif (file_exists ('/usr/bin/dnf ' ) && (!file_exists ('/usr/bin/yum ' )) || (! is_link ( ' /usr/bin/yum ' )) ) {
172+ } elseif (file_exists ('/usr/bin/dnf ' ) && (!file_exists ('/usr/bin/yum ' ))) {
172173 $ rhPkgMgr = 'dnf ' ;
173174 } else {
174175 $ rhPkgMgr = 'yum ' ;
175176 }
176177
177- $ aptData = shell_exec ($ rhPkgMgr . ' -q list updates ' );
178+ $ aptData = shell_exec ($ rhPkgMgr . ' -q list updates ' );
179+
178180 if ($ aptData == '' ) {
179181 /* There is nothing to update! */
180182 $ state = 'ok ' ;
@@ -188,7 +190,8 @@ public function onRunJob() {
188190
189191 /*
190192 * Fetch the output
191- */
193+ */
194+
192195 $ data ['output ' ] = shell_exec ($ rhPkgMgr . ' -q list updates ' );
193196
194197 } else {
You can’t perform that action at this time.
0 commit comments