#!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-admin/logsurfer+/files/logsurfer.initd,v 1.1 2006/12/30 01:06:27 matsuu Exp $ depend() { use logger } checkconfig() { if [ ! -f /etc/logsurfer.conf ] ; then eerror "Please create /etc/logsurfer.conf" return 1 fi return 0 } start() { checkconfig || return $? ebegin "Starting logsurfer" start-stop-daemon --start --background --exec /usr/bin/logsurfer \ -- -p /var/run/logsurfer.pid ${LOGSURFER_OPTS} eend $? } stop() { ebegin "Stopping logsurfer" start-stop-daemon --stop --pidfile /var/run/logsurfer.pid eend $? }