From cc5e67b87b3acda63156bcd135699445a84fadfb Mon Sep 17 00:00:00 2001 From: Michele Di Maria Date: Mon, 23 Jan 2012 20:34:01 +0100 Subject: - Fix the uptime screen - In the settings, "Enable LCDproc" becomes "Enable LCDproc at startup" - Added "After Install Info" message - Limited the client loop to three times. After three errors connecting to the LCDd service the client will end --- config/lcdproc-dev/lcdproc.inc | 16 +++++++++------- config/lcdproc-dev/lcdproc.xml | 6 +++--- config/lcdproc-dev/lcdproc_client.php | 13 +++++++------ config/lcdproc-dev/lcdproc_screens.xml | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) (limited to 'config/lcdproc-dev') diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 5971f61f..3d0a7e69 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -2,7 +2,7 @@ /* $Id$ */ /* lcdproc.inc - Copyright (C) 2007 Seth Mos + Copyright (C) 2007 Seth Mos All rights reserved. Redistribution and use in source and binary forms, with or without @@ -237,6 +237,7 @@ $config_text .= "User=nobody\n"; $config_text .= "ServerScreen=no\n"; $config_text .= "Foreground=no\n"; + $config_text .= "TitleSpeed=10\n"; $config_text .= "DriverPath=/usr/local/lib/lcdproc/\n"; $config_text .= "GoodBye=\"Thanks for using\"\n"; $config_text .= "GoodBye=\" {$g['product_name']} \"\n"; @@ -501,23 +502,24 @@ /* generate rc file start and stop */ $client_script = << +?> \ No newline at end of file diff --git a/config/lcdproc-dev/lcdproc.xml b/config/lcdproc-dev/lcdproc.xml index ff80e8a3..51a80f72 100644 --- a/config/lcdproc-dev/lcdproc.xml +++ b/config/lcdproc-dev/lcdproc.xml @@ -1,8 +1,8 @@ - Services: LCDproc 0.5.5 pkg v. 0.8 + Services: LCDproc 0.5.5 pkg v. 0.9 lcdproc - 0.5.5 pkg v. 0.8 + 0.5.5 pkg v. 0.9 Save /usr/local/pkg/lcdproc.inc @@ -55,7 +55,7 @@ - Enable LCDproc + Enable LCDproc at startup enable checkbox diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php index be7efa3f..d931b9d0 100644 --- a/config/lcdproc-dev/lcdproc_client.php +++ b/config/lcdproc-dev/lcdproc_client.php @@ -2,7 +2,7 @@ /* $Id$ */ /* lcdproc_client.php - Copyright (C) 2007 Seth Mos + Copyright (C) 2007 Seth Mos All rights reserved. Redistribution and use in source and binary forms, with or without @@ -97,13 +97,14 @@ function get_uptime_stats() { exec("/usr/bin/uptime", $output, $ret); + $temp = explode(",", $output[0]); if(stristr($output[0], "day")) { - $temp = explode(" ", $output[0]); - $status = "$temp[2] $temp[3] $temp[4] $temp[5] $temp[6] $temp[7] ". substr($temp[8], 0, -1); + $status = "$temp[0] $temp[1]"; } else { - $temp = explode(" ", $output[0]); - $status = "$temp[2] $temp[3] $temp[4] $temp[5] $temp[6] ". substr($temp[7], 0, -1); + $status = "$temp[0] "; } + $status = trim(str_replace(" ", " ", $status)); + $status = substr($status, strpos($status, "up ") + 3); return($status); } @@ -892,4 +893,4 @@ /* loop exited? Close fd and wait for the script to kick in again */ fclose($lcd); } -?> +?> \ No newline at end of file diff --git a/config/lcdproc-dev/lcdproc_screens.xml b/config/lcdproc-dev/lcdproc_screens.xml index 8b79870d..b49018e3 100644 --- a/config/lcdproc-dev/lcdproc_screens.xml +++ b/config/lcdproc-dev/lcdproc_screens.xml @@ -2,7 +2,7 @@ Services: LCDproc: Screens lcdproc_screens - 0.5.5 pkg v. 0.8 + 0.5.5 pkg v. 0.9 Save /usr/local/pkg/lcdproc.inc -- cgit v1.2.3