From 8c7879896c6b270976753546f9aab34d6635d1be Mon Sep 17 00:00:00 2001 From: Daniel Menelkir Date: Wed, 10 Feb 2021 07:32:37 -0300 Subject: [PATCH] x# new file: contrib/init/g15stats.confd x# new file: contrib/init/g15stats.initd x# deleted: extras/g15stats.confd x# deleted: extras/g15stats.initd --- contrib/init/g15stats.confd | 20 ++++++++++++++++++++ contrib/init/g15stats.initd | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 contrib/init/g15stats.confd create mode 100644 contrib/init/g15stats.initd diff --git a/contrib/init/g15stats.confd b/contrib/init/g15stats.confd new file mode 100644 index 0000000..4bf61c2 --- /dev/null +++ b/contrib/init/g15stats.confd @@ -0,0 +1,20 @@ +# /etc/conf.d/g15stats: Configuration for the G15 stats + +#Gather statistics from named interface (ie eth0) +#Network Screen displays Total bytes In/Out, history graph, Peak speed. +IFACE="eth0" + +# Please see g15stats --help for meanings +#TEMP_INPUT=1 +#GLOBAL_TEMP_INPUT=1 +#FAN_INPUT=1 + +# please see g15stats --help for all options +# As of 1.9.7, the options where: +# --unicore +# --net-scale-absolute +# --info-rotate +# --variable-cpu +# --refresh +# --disable-freq +EXTRA_OPTS="${IFACE:+--interface} ${IFACE} ${TEMP_INPUT:+--temperature} ${TEMP_INPUT} ${GLOBAL_TEMP_INPUT:+--global-temp} ${GLOBAL_TEMP_INPUT} ${FAN_INPUT:+--fan} ${FAN_INPUT}" diff --git a/contrib/init/g15stats.initd b/contrib/init/g15stats.initd new file mode 100644 index 0000000..56a77d3 --- /dev/null +++ b/contrib/init/g15stats.initd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/var/run/${SVCNAME}.pid + +depend() { + need g15daemon + after xdm +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --background --make-pidfile --pidfile ${PIDFILE} --exec \ + /usr/bin/g15stats -- "${EXTRA_OPTS}" + eend $? +} + +stop() { + ebegin "Stoping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${PIDFILE} --name g15stats + eend $? +}