pxe-bootserver/main.sh
2023-04-18 15:38:46 +02:00

72 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
. ./settings.sh
case $1 in
#
# services
#
services)
# find services:
SLIST=$(ls ./conf.d/service_*.conf.sh )
# process command
case $2 in
init)
echo "--------------------------------------------------"
echo "service init..."
echo "--------------------------------------------------"
for ITEM in ${SLIST};
do
$ITEM init
done
;;
start)
echo "--------------------------------------------------"
echo "service start..."
echo "--------------------------------------------------"
for ITEM in ${SLIST};
do
$ITEM start
done
;;
stop)
echo "--------------------------------------------------"
echo "service stop..."
echo "--------------------------------------------------"
for ITEM in ${SLIST};
do
$ITEM stop
done
;;
restart)
echo "--------------------------------------------------"
echo "service restart..."
echo "--------------------------------------------------"
for ITEM in ${SLIST};
do
$ITEM restart
done
;;
esac
;;
#
# menues
#
menues)
;;
#
# plugins
#
plugins)
;;
*)
echo "Usage: $0 services [init|start|stop|restart]"
echo " $0 menues [init]"
echo " $0 plugins [init|build|download]"
;;
esac