blob: a2089c2c8ccfc5e6a9fa7fb8f18b28680c775694 (
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
25
26
27
28
29
30
31
|
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
depend() {
need net
after bootmisc
}
start() {
ebegin "Starting telegraf"
start-stop-daemon --start -b \
--user ${TELEGRAF_USER}:${TELEGRAF_GROUP} \
--pidfile /run/telegraf.pid \
--make-pidfile \
--stdout /var/log/telegraf/telegraf.log \
--stderr /var/log/telegraf/telegraf.log \
--exec /usr/bin/telegraf
eend $?
}
stop() {
ebegin "Stopping telegraf"
start-stop-daemon --stop \
--pidfile /run/telegraf.pid \
--exec /usr/bin/telegraf
eend $?
}
|