You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
471 B

#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "root privileges needed. Aborting."
exit
fi
case "$1" in
start|on)
echo -n "Starting the web dashboard..."
systemctl start php7.3-fpm.service
rm -f /var/www/html/index.html
echo " OK"
;;
stop|off)
echo -n "Stopping the web dashboard..."
cp -a /root/index.html /var/www/html/index.html
systemctl stop php7.3-fpm.service
echo " OK"
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac