From f100ce481378316dae03c2d72f060d897bd37b01 Mon Sep 17 00:00:00 2001 From: Tim 'timtim' Ellis Date: Fri, 23 Jan 2009 19:07:42 +0000 Subject: temper: Add init script before my n1200 melts. --- packages/temper/files/init | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 packages/temper/files/init (limited to 'packages/temper/files') diff --git a/packages/temper/files/init b/packages/temper/files/init new file mode 100644 index 0000000000..a5307205cb --- /dev/null +++ b/packages/temper/files/init @@ -0,0 +1,32 @@ +#! /bin/sh +# temper - simple init.d temper fan control script - tim.ellis@foonas.org +set -e + +if [ ! -f /usr/sbin/temper ]; then + echo -n "Warning: temper fan control script not found. Shutting down" + shutdown -h now + exit -1 +fi + +case "$1" in + start) + echo -n "Starting temper: " + start-stop-daemon -S -b -n temper -a /usr/sbin/temper + echo "done" + ;; + stop) + echo -n "Stopping temper: " + start-stop-daemon -K -n temper >&- 2>&- & + echo "done" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: temper { start | stop | restart }" >&2 + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.3