aboutsummaryrefslogtreecommitdiffstats
path: root/testing/uptimed/uptimed.init
diff options
context:
space:
mode:
authorBartłomiej Piotrowski <bpiotrowski@alpinelinux.org>2013-05-29 20:37:31 +0200
committerBartłomiej Piotrowski <bpiotrowski@alpinelinux.org>2013-05-29 20:37:31 +0200
commite7b5d3083c07c249bb5bb8c68852833605e55382 (patch)
treebadf0f55339bad66576fa0e2843f2216c64ce113 /testing/uptimed/uptimed.init
parent7f70bc3131f0c16a55fa63e156bfd7cd0b446c75 (diff)
downloadaports-e7b5d3083c07c249bb5bb8c68852833605e55382.tar.bz2
aports-e7b5d3083c07c249bb5bb8c68852833605e55382.tar.xz
testing/uptimed: simplify daemon
Diffstat (limited to 'testing/uptimed/uptimed.init')
-rw-r--r--testing/uptimed/uptimed.init16
1 files changed, 1 insertions, 15 deletions
diff --git a/testing/uptimed/uptimed.init b/testing/uptimed/uptimed.init
index 1a9307c5af..deba54128c 100644
--- a/testing/uptimed/uptimed.init
+++ b/testing/uptimed/uptimed.init
@@ -1,26 +1,12 @@
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/uptimed/files/uptimed.init,v 1.8 2013/01/14 18:08:59 polynomial-c Exp $
description="uptimed - a daemon to record uptime records"
pidfile="/var/run/uptimed/uptimed.pid"
command="/usr/sbin/uptimed"
command_args="-p ${pidfile}"
-start_stop_daemon_args="-u uptimed"
start_pre() {
- checkpath -d -o uptimed ${pidfile%/*}
-
- # Initialize bootid for uptimed < 0.3.17
- local udver=$(${command} -v | head -n 1 | sed 's@.*[[:space:]]\([[:digit:]\.]\+\)[[:space:]].*@\1@;s@\.@@g')
- local bootid="/var/spool/uptimed/bootid"
- if [ "${udver}" -lt "0317" ] ; then
- ${command} -b || eend $?
- checkpath -f -o uptimed ${bootid}
- else
- if [ -f "${bootid}" ] ; then
- rm ${bootid}
- fi
- fi
+ uptimed -b
}