tools/setup.slackware

Thu, 13 May 2021 13:49:04 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 13 May 2021 13:49:04 +0200
changeset 612
452f79a5ad71
permissions
-rw-r--r--

Make sure the hostname doesn't contain the domain name. Added Slackare init and setup scripts.

#!/bin/sh
#BLURB="Enable/disable the Fermentation Controller at boot"
#
# System setup script for Slackware
#
#
T_PX=$1
TMP=/var/lib/pkgtools/setup/tmp
if [ "$COLOR" = "on" -o -r $TMP/SeTcolor ]; then
  dialog --title "ENABLE thermferm DAEMON AT BOOT?" --yesno \
 "Thermferm is a brewery fermentation controller that controls \
  fermenters temperatures. This is done by controlling cooling \
  or heating. Comminucation to the upper level is done via an \
  MQTT broker. For local maintenance there is a web interface." 10 70
  if [ $? = 0 ]; then
    mkdir -p /etc/rc.d/rc0.d /etc/rc.d/rc1.d /etc/rc.d/rc3.d /etc/rc.d/rc4.d /etc/rc.d/rc6
    ln -s /etc/rc.d/init.d/thermferm /etc/rc.d/rc0.d/K14thermferm
    ln -s /etc/rc.d/init.d/thermferm /etc/rc.d/rc1.d/K14thermferm
    ln -s /etc/rc.d/init.d/thermferm /etc/rc.d/rc3.d/S86thermferm
    ln -s /etc/rc.d/init.d/thermferm /etc/rc.d/rc4.d/S86thermferm
    ln -s /etc/rc.d/init.d/thermferm /etc/rc.d/rc6.d/K14thermferm
  else
    rm -f /etc/rc.d/rc{0,1,6}.d/K14thermferm /etc/rc.d/rc{3,4}.d/S86thermferm
  fi
fi

mercurial