# HG changeset patch # User Michiel Broek # Date 1710583707 -3600 # Node ID 0f6daacdd597d3d24305ff2331682219fa6879ba # Parent 276ee5b6134897c46d3179fde85e4b21c8aaa64d Renamed initscript diff -r 276ee5b61348 -r 0f6daacdd597 tools/Makefile --- a/tools/Makefile Sat Mar 16 11:06:16 2024 +0100 +++ b/tools/Makefile Sat Mar 16 11:08:27 2024 +0100 @@ -2,7 +2,7 @@ include ../Makefile.global -OTHER = Makefile rc.slackware default +OTHER = Makefile rc.thermferm default ############################################################################# @@ -17,7 +17,7 @@ install: mkdir -p ${DESTDIR}/etc/rc.d ${DESTDIR}/etc/default - ${INSTALL} -c -g root -o root -m 0755 rc.slackware ${DESTDIR}/etc/rc.d/rc.thermferm + ${INSTALL} -c -g root -o root -m 0755 rc.thermferm ${DESTDIR}/etc/rc.d/rc.thermferm ${INSTALL} -c -g root -o root -m 0644 default ${DESTDIR}/etc/default/thermferm filelist: Makefile diff -r 276ee5b61348 -r 0f6daacdd597 tools/rc.slackware --- a/tools/rc.slackware Sat Mar 16 11:06:16 2024 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -#!/bin/bash -# -# thermferm init script for Slackware. -# -# Copyright 2022-2024 Michiel Broek, the Netherlands. - -# Source default settings: -if [ -r /etc/default/thermferm ]; then - . /etc/default/thermferm -fi - -PIDFILE=/run/thermferm.pid - -case "$1" in - start) - echo -n "Starting Fermentation Controller: " - if [ -f ${PIDFILE} ]; then - echo "already running." - else - ${THERMFERM_BIN} - 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 2 - $0 start - ;; - - *) - echo "usage: $0 {start|stop|restart}" -esac - diff -r 276ee5b61348 -r 0f6daacdd597 tools/rc.thermferm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/rc.thermferm Sat Mar 16 11:08:27 2024 +0100 @@ -0,0 +1,44 @@ +#!/bin/bash +# +# thermferm init script for Slackware. +# +# Copyright 2022-2024 Michiel Broek, the Netherlands. + +# Source default settings: +if [ -r /etc/default/thermferm ]; then + . /etc/default/thermferm +fi + +PIDFILE=/run/thermferm.pid + +case "$1" in + start) + echo -n "Starting Fermentation Controller: " + if [ -f ${PIDFILE} ]; then + echo "already running." + else + ${THERMFERM_BIN} + 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 2 + $0 start + ;; + + *) + echo "usage: $0 {start|stop|restart}" +esac +