tools/init.slackware

Thu, 14 Mar 2024 17:07:09 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 14 Mar 2024 17:07:09 +0100
changeset 633
8b84e73af50e
parent 614
389097dc665d
permissions
-rw-r--r--

Add DESTDIR installation target. Some kicad update again. Moved init script to /etc/rc.d

#!/bin/bash
#
# thermferm init script for Slackware.
#
# Copyright 2022-2024 Michiel Broek, the Netherlands.

PIDFILE=/run/thermferm.pid

case "$1" in
  start)
    echo -n "Starting Fermentation Controller: "
    if [ -f ${PIDFILE} ]; then
  	echo "already running."
    else
	/usr/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 2
    $0 start
    ;;

  *)
    echo "usage: $0 {start|stop|restart}"
esac

mercurial