summaryrefslogtreecommitdiff
blob: cfd2998c167280e684cbe66b75aad41f79e97b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/runscript
# Copyright 1999-2004 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.4 2011/08/07 13:22:39 armin76 Exp $

# Copyright 2002-2011 Sean Russell

PIDFILE="/var/run/uptimed/uptimed.pid"

start() {
	ebegin "Starting uptimed"
	start-stop-daemon --quiet --start --user uptimed \
		--exec /usr/sbin/uptimed --pidfile "${PIDFILE}" -- -b
	start-stop-daemon --quiet --start --user uptimed \
		--exec /usr/sbin/uptimed --pidfile "${PIDFILE}" \
		-- -p ${PIDFILE}
	eend $?
}

stop() {
	ebegin "Stopping uptimed"
	start-stop-daemon --quiet --stop --user uptimed --pidfile "${PIDFILE}"
	eend $?
}