aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rrdcollect/rrdcollect.initd
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2012-03-21 14:41:41 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-21 13:48:09 +0000
commit36d09d5b6774ec30ffb5f996fd849cf42bcf7012 (patch)
tree492a49dfcdb02c48e1299f8fcbf9db869fc47658 /testing/rrdcollect/rrdcollect.initd
parentddba36b95362ceac759500d05d236339697fe4b8 (diff)
downloadaports-36d09d5b6774ec30ffb5f996fd849cf42bcf7012.tar.bz2
aports-36d09d5b6774ec30ffb5f996fd849cf42bcf7012.tar.xz
testing/rrdcollect: Version bump. Init.d scripts. Patching default rrdcollect.conf to work with alpine linux
Diffstat (limited to 'testing/rrdcollect/rrdcollect.initd')
-rwxr-xr-xtesting/rrdcollect/rrdcollect.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/rrdcollect/rrdcollect.initd b/testing/rrdcollect/rrdcollect.initd
new file mode 100755
index 0000000000..da566116e1
--- /dev/null
+++ b/testing/rrdcollect/rrdcollect.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+
+description="rrdcollect daemon"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command="/usr/sbin/rrdcollect"
+runas="root"
+
+start_pre() {
+ checkpath --directory --owner ${runas}:${runas} --mode 775 ${pidfile%/*}
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start \
+ --user ${runas} \
+ --pidfile ${pidfile} \
+ --exec ${command} \
+ -- ${RRD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop \
+ --pidfile ${pidfile}
+ eend $?
+}