#!/bin/sh # # Global Settings # # The location of all the TFTP stuff D_TFTP=/srv/tftp # Full path of this project: D_ROOTDIR=/root/pxe-bootserver # the ip and FQDN for this server HOST_IP=192.168.75.3 HOST_FQDN=tftp.ostrach.tld # # Functions # fservice (){ # $1 is enabled yes/no # $2 is the command # $3 is the program name # $4 is a list of packages if [ "$1" = "yes" ] || [ "$1" = "YES" ]; then echo "touching $3 :" case $2 in # INIT # Install needed Debian Packages: init) echo "installing: $4" apt install -y $4 ;; start) if ! [ "$3" = "none" ]; then systemctl start $3 fi ;; stop) if ! [ "$3" = "none" ]; then systemctl stop $3 fi ;; restart) if ! [ "$3" = "none" ]; then systemctl restart $3 fi ;; esac else echo "$3 is disabled. nothing to do..." fi }