diff options
Diffstat (limited to 'system/uptimed')
-rw-r--r-- | system/uptimed/README | 31 | ||||
-rw-r--r-- | system/uptimed/uptimed.SlackBuild | 20 |
2 files changed, 33 insertions, 18 deletions
diff --git a/system/uptimed/README b/system/uptimed/README index dc1d782990..21d9911a16 100644 --- a/system/uptimed/README +++ b/system/uptimed/README @@ -8,16 +8,19 @@ Note: See below on how to launch uptimed automatically. Additional configuration via "/etc/uptimed.conf" (See "/etc/uptimed.conf-dist") -The uptimed daemon runs in the background and regularly stores the following -data to "/var/spool/uptimed/records"; -"<Uptime in seconds>:<Boot up in unixtime>:<System kernel name and release>" +The uptimed daemon runs in the background and regularly stores the +following data to "/var/spool/uptimed/records"; + +"<Uptime in seconds>:<Boot up in unixtime>:<Kernel name and release>" + The boot up value is used as a unique identifier. See "uprecords -?" for additional record display options. -The "uprecords" file can be copied as "uprecords.cgi" to your CGI directory, -and will render Content-type head information and HTML tabs as necessary. -(See "INSTALL.cgi" in the extracted source for more information.) +The "uprecords" file can be copied as "uprecords.cgi" to your CGI +directory, and will render Content-type head information and HTML tabs +as necessary. (See "INSTALL.cgi" in the extracted source for more +information.) To have the daemon launch automatically at boot time, 1) Set the rc.uptimed file as executable; @@ -27,12 +30,12 @@ To have the daemon launch automatically at boot time, /etc/rc.d/rc.uptimed start & fi -Q: Why are my records not saved between reboots? I can see the current uptime - info with the 'uprecords' command. -A: The uptimed daemon was possibly not running to regularly save the data to the - "/var/spool/uptimed/records" file. See above on how to automatically start - the daemon, and confirm that the "/var/spool/uptimed" directory exists - and is writable. +Q: Why are my records not saved between reboots? I can see the current + uptime info with the 'uprecords' command. +A: The uptimed daemon was possibly not running to regularly save the + data to the "/var/spool/uptimed/records" file. See above on how to + automatically start the daemon, and confirm that the + "/var/spool/uptimed" directory exists and is writable. -If performing an upgrade, you may need to chmod 755 rc.uptimed and restart the -daemon with "/etc/rc.d/rc.uptimed restart". +If performing an upgrade, you may need to chmod 755 rc.uptimed and +restart the daemon with "/etc/rc.d/rc.uptimed restart". diff --git a/system/uptimed/uptimed.SlackBuild b/system/uptimed/uptimed.SlackBuild index 7695976e9e..2aa4443f9d 100644 --- a/system/uptimed/uptimed.SlackBuild +++ b/system/uptimed/uptimed.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Graham Orange v0.18 2015-11-02 # Copyright 2015 Graham Orange, USA @@ -21,10 +21,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=uptimed VERSION=${VERSION:-0.4.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +39,14 @@ fi DOCS="AUTHORS COPYING CREDITS ChangeLog INSTALL* NEWS README* TODO" -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -101,9 +111,11 @@ install -m 644 $CWD/rc.uptimed $PKG/etc/rc.d/rc.uptimed mv $PKG/etc/uptimed.conf-dist $PKG/etc/uptimed.conf-dist.new +rm -f $PKG/usr/lib*/*.la + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |