testan a reboold

This commit is contained in:
2025-10-14 06:45:57 -06:00
parent 5b5f01639d
commit 9b347ba72c
3 changed files with 22 additions and 16 deletions
+8 -2
View File
@@ -1,5 +1,11 @@
#!/bin/bash
set -e
# set -e
# get real user
if [ ! -z $SUDO_USER ]; then
username=$SUDO_USER
else
username=$USER
fi
if [ -z $1 ]; then
echo "Usage: bash services.sh stop|start|restart|status|enable"
@@ -8,4 +14,4 @@ fi
echo "Running $1 on Services"
sudo systemctl $1 gpsd chrony influxdb telegraf grafana-server syslog-ng
echo "services complete" >> ./status.txt
echo "services complete" >> /home/$username/status.txt