You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-admin/logsurfer+/files/logsurfer-1.8.initd-r1

33 lines
785 B

#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
pidfile="/run/logsurfer.pid"
command="/usr/bin/logsurfer"
command_args="${LOGSURFER_OPTS}"
command_user="logsurfer"
command_background=true
extra_started_commands="reload dump"
depend() {
use logger
}
start_pre() {
# logsurfer won't start without a config file, but
# it doesn't mind an empty one.
checkpath --file /etc/logsurfer.conf
}
reload() {
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $? "Failed to reload ${RC_SVCNAME}"
}
dump() {
ebegin "Dumping ${RC_SVCNAME} internal state"
start-stop-daemon --signal USR1 --pidfile "${pidfile}"
eend $? "Failed to dump ${RC_SVCNAME} internal state"
}