python3: update to 3.11.10
[openadk.git] / package / collectd / files / collectd.init
blob0b34a43ca7f090953cadd1ab309b2b6fce35c7e0
1 #!/bin/sh
2 #PKG collectd
3 #INIT 75
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${collectd:-NO}" = x"NO" && exit 0
10 test x"$collectd" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 [ -d /var/lib/collectd ] || mkdir -p /var/lib/collectd
15 /usr/sbin/collectd
17 stop)
18 kill $(pgrep -f /usr/sbin/collectd)
20 restart)
21 sh $0 stop
22 sh $0 start
25 echo "Usage: $0 {start | stop | restart}"
26 exit 1
28 esac
29 exit $?