From 232fcc38825b03debdb46f1abe7b0bf323516103 Mon Sep 17 00:00:00 2001 From: Hyper-KVM Date: Wed, 19 Feb 2020 15:57:14 -0500 Subject: [PATCH] Add OpenRC support testing --- openrc/lenovo_fix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 openrc/lenovo_fix diff --git a/openrc/lenovo_fix b/openrc/lenovo_fix new file mode 100644 index 0000000..23b4467 --- /dev/null +++ b/openrc/lenovo_fix @@ -0,0 +1,18 @@ +#!/usr/bin/openrc-run + +command="PYTHONUNBUFFERED=1 /opt/lenovo_fix/venv/bin/python3 /opt/lenovo_fix/lenovo_fix.py" +pidfile=${pidfile-/var/run/lenovo_fix.pid} +description="Stop Intel throttling" + +start() { + ebegin "Starting Throttled daemon" + start-stop-daemon --quiet --background --start --exec $command \ + --make-pidfile --pidfile $pidfile -- "" + eend $? "Failed to start Throttled daemon" +} + +stop() { + ebegin "Stopping Throttled daemon" + start-stop-daemon --quiet --stop --pidfile $pidfile --signal QUIT + eend $? "Failed to stop Throttled daemon" +}