aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rsyslog/rsyslog.initd
diff options
context:
space:
mode:
authorCameron Banta <cbanta@gmail.com>2010-12-13 17:36:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-14 10:23:24 +0000
commit36d7505e01641fdbfa85d1d83076633b06545649 (patch)
treeadacf69aff6edd791de13b1b4944d06e1956268c /testing/rsyslog/rsyslog.initd
parentf4377b771e78b3fa94a9e54f4f3cb93d9d5bff29 (diff)
downloadaports-36d7505e01641fdbfa85d1d83076633b06545649.tar.gz
aports-36d7505e01641fdbfa85d1d83076633b06545649.tar.bz2
aports-36d7505e01641fdbfa85d1d83076633b06545649.tar.xz
testing/rsyslog: new package
Diffstat (limited to 'testing/rsyslog/rsyslog.initd')
-rw-r--r--testing/rsyslog/rsyslog.initd38
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/rsyslog/rsyslog.initd b/testing/rsyslog/rsyslog.initd
new file mode 100644
index 0000000000..68ff86c06e
--- /dev/null
+++ b/testing/rsyslog/rsyslog.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/5-stable/rsyslog.initd,v 1.1 2010/10/21 07:38:29 dev-zero Exp $
+
+opts="reload"
+
+depend() {
+ provide logger
+}
+
+start() {
+ ebegin "Starting rsyslogd"
+ start-stop-daemon \
+ --start --quiet --exec /usr/sbin/rsyslogd \
+ -- ${RSYSLOG_OPTS} -i "${PIDFILE}" -f "${CONFIGFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rsyslogd"
+ start-stop-daemon \
+ --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $?
+}
+
+reload() {
+ if [ ! -f "${PIDFILE}" ]; then
+ eerror "rsyslogd not running"
+ return 1
+ fi
+
+ ebegin "Re-opening rsyslogd log files"
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --pidfile "${PIDFILE}"
+ eend $?
+}