From 5390cbdfe941f19e146ebbd7587c33c84ac7b318 Mon Sep 17 00:00:00 2001 From: Nicolas LLOBERA Date: Mon, 20 Mar 2017 16:20:07 +0100 Subject: [PATCH 1/3] checks if the file exists before trying the command --- libs/system.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/system.php b/libs/system.php index 702ef3b..ee43722 100644 --- a/libs/system.php +++ b/libs/system.php @@ -6,11 +6,11 @@ date_default_timezone_set(@date_default_timezone_get()); $hostname = php_uname('n'); // OS -if (!($os = shell_exec('/usr/bin/lsb_release -ds | cut -d= -f2 | tr -d \'"\''))) +if (!file_exists('/usr/bin/lsb_release') || !($os = shell_exec('/usr/bin/lsb_release -ds | cut -d= -f2 | tr -d \'"\''))) { - if (!($os = shell_exec('cat /etc/system-release | cut -d= -f2 | tr -d \'"\''))) + if (!file_exists('/etc/system-release') || !($os = shell_exec('cat /etc/system-release | cut -d= -f2 | tr -d \'"\''))) { - if (!($os = shell_exec('cat /etc/os-release | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\''))) + if (!file_exists('/etc/os-release') || !($os = shell_exec('cat /etc/os-release | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\''))) { if (!($os = shell_exec('find /etc/*-release -type f -exec cat {} \; | grep PRETTY_NAME | tail -n 1 | cut -d= -f2 | tr -d \'"\''))) { @@ -72,4 +72,4 @@ $datas = array( 'server_date' => $server_date, ); -echo json_encode($datas); \ No newline at end of file +echo json_encode($datas); From 3b04b43e1792ee127ad4342384e3d6e6cc144445 Mon Sep 17 00:00:00 2001 From: Nicolas LLOBERA Date: Mon, 20 Mar 2017 16:51:18 +0100 Subject: [PATCH 2/3] Revert "dark theme" This reverts commit 859f243fa2f3f8d305c00a3096eda4e1fb9082a0. --- index.php | 1 - web/css/darktheme.css | 77 ------------------------------------------- 2 files changed, 78 deletions(-) delete mode 100644 web/css/darktheme.css diff --git a/index.php b/index.php index 9ad270b..fbf0c09 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,6 @@ $update = $Config->checkUpdate(); eZ Server Monitor - <?php echo Misc::getHostname(); ?> -