tools/init.slackware

Fri, 28 May 2021 14:25:56 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 28 May 2021 14:25:56 +0200
changeset 613
163fcb0914e2
parent 612
452f79a5ad71
child 614
389097dc665d
permissions
-rw-r--r--

Added kicad drawings

#!/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

mercurial