diff -r 732d482f47c8 -r 452f79a5ad71 tools/init.slackware --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/init.slackware Thu May 13 13:49:04 2021 +0200 @@ -0,0 +1,39 @@ +#!/bin/bash +# +# thermferm init script for Slackware. +# +# Copyright 2021 Michiel Broek, the Netherlands. + +PIDFILE=/var/run/thermferm.pid + +case "$1" in + start) + echo -n "Starting Fermentation Controller: " + if [ -f ${PIDFILE} ]; then + echo "already running." + else + /usr/local/bin/thermferm + echo "done." + fi + ;; + + stop) + echo -n "Stopping Fermentation Controller: " + if [ -f ${PIDFILE} ]; then + kill $(cat ${PIDFILE}) + echo "done." + else + echo "wasn't running." + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 {start|stop|restart}" +esac +