From: Francois Fleuret Date: Sat, 14 Nov 2015 12:30:38 +0000 (+0100) Subject: Starting to add systemd support. X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=breezed.git;a=commitdiff_plain;h=6cf4b145749dae7c6f31ca5efc8fb8444bd19dd1 Starting to add systemd support. --- diff --git a/Makefile b/Makefile index 2a4b9e4..c635dcd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # breezed is a fan speed control daemon for Linux computers. # -# Copyright (c) 2008 Francois Fleuret +# Copyright (c) 2008-2015 Francois Fleuret # Written by Francois Fleuret # # This file is part of breezed. @@ -46,5 +46,18 @@ uninstall: rm $(DESTDIR)/etc/init.d/breezed.sh rm $(BINARY_PATH)/breezed +install-systemd: breezed $(DESTDIR)/etc/breezed.conf + install -m 755 breezed $(BINARY_PATH) + install -m 644 breezed.1 $(MAN_PATH) + gzip $(MAN_PATH)/breezed.1 + install -m 644 breezed.service /etc/systemd/system/ + systemctl start breezed + +uninstall-systemd: + systemctl stop breezed + rm /etc/systemd/system/breezed.service + rm $(MAN_PATH)/breezed.1.gz + rm $(BINARY_PATH)/breezed + clean: \rm -f breezed diff --git a/README.txt b/README.txt index 13f583f..50e84cb 100644 --- a/README.txt +++ b/README.txt @@ -1,22 +1,27 @@ Breezed is a small daemon to control the speed of the fan, - depending on the current temperature of the computer. I have tested - it only on a Thinkpad X61s and T420s. + depending on the current temperature of the computer. + + DISCLAIMER: I have tested it only on my Thinkpads X61s, T420s, and + T450s with Debian stable. * INSTALLATION Before installing, you must have a configuration file in /etc/breezed.conf. - Two are currently provided in the archive, and they use the - settings *I* picked for my Lenovo X61s and T420s. I have no idea if - these settings are safe on these laptops (I guess so, since I have - been using them for years on both), and I suspect they are not safe - for another laptop. If you want to give it a try, just do + Three are provided in the archive, and they use the settings *I* + picked for my Lenovo Thinkpads. I have no idea if these settings + are safe on these laptops -- I guess so, since I have been using + them for years on both -- and I suspect they are not safe for + another laptop. + + If you want to give it a try, just copy of the configuration file, + e.g. cp breezed_Lenovo_X61s.conf /etc/breezed.conf - Then, you can install the daemon simply with + Then install the daemon simply with make install @@ -24,15 +29,17 @@ make uninstall + Use respectively install-systemd and uninstall-systemd to install + it for systemd. + See the man page for details about the algorithm, arguments and configuration file. * NOTES On Thinkpads you have to allow the module thinkpad_acpi to set the - fan speed, which is not allowed by default in Debian. To do so, you - have to have a file /etc/modprobe.d/thinkpad_acpi.modprobe - containing + fan speed, which is not allowed by default in Debian. To do so, add + a file /etc/modprobe.d/thinkpad_acpi.conf containing ---------------------------- snip snip ------------------------------- options thinkpad_acpi fan_control=1 @@ -40,4 +47,4 @@ -- Francois Fleuret (francois@fleuret.org) -April 2009 (minor updates Jan 2012, Jul 2013) +Nov 2015 diff --git a/breezed.service b/breezed.service new file mode 100755 index 0000000..367a3e9 --- /dev/null +++ b/breezed.service @@ -0,0 +1,7 @@ +[Unit] +Description=Fan control daemon + +[Service] +Type=simple +ExecStart=/usr/bin/breezed +PIDFile=/var/run/breezed.pid