From 034d960e019645b0305c22f781b8ad555e220cc9 Mon Sep 17 00:00:00 2001 From: "michael@ilovecode.dk" Date: Sat, 26 Apr 2014 00:06:59 +0200 Subject: [PATCH] I have to learn whats true or false, it works great when running sudo php -f status.cron.php, but fails when updating true website --- src/psm/Util/Updater/StatusUpdater.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/psm/Util/Updater/StatusUpdater.class.php b/src/psm/Util/Updater/StatusUpdater.class.php index 8ad44bfb..57d50ac4 100644 --- a/src/psm/Util/Updater/StatusUpdater.class.php +++ b/src/psm/Util/Updater/StatusUpdater.class.php @@ -237,7 +237,8 @@ class StatusUpdater { /* Only run if is cron * socket_create() need to run as root :( - * ugly hack cli hack i know + * ugly cli hack i know + * might be a better way still have not found a solution when updating true website */ //if(psm_is_cli()) { @@ -254,7 +255,7 @@ class StatusUpdater { socket_send($socket, $package, strLen($package), 0); // if ping fails it returns false - $status = (socket_read($socket, 255)) ? false : true; + $status = (socket_read($socket, 255)) ? true : false; $this->rtime = (microtime(true) - $starttime); socket_close($socket);