From 9b7b819530426129070f4a6f62d156e3d9076278 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Tue, 3 Jun 2025 06:18:24 -0600 Subject: [PATCH] 1748953105 --- README.md | 2 ++ full_status.sh | 2 +- reconfig_full.sh | 8 ++++---- restart_services.sh | 3 --- services.sh | 10 ++++++++++ start_services.sh | 3 --- status_services.sh | 3 --- stop_services.sh | 3 --- 8 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 restart_services.sh create mode 100644 services.sh delete mode 100644 start_services.sh delete mode 100644 status_services.sh delete mode 100644 stop_services.sh diff --git a/README.md b/README.md index 1a173e7..781a42e 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ Upload ~/Garfana-Visualization.json to create dashboard * data source * fix * Raspberry OS Lite + * chrony_statistics.sh + * services.h **known bugs** doubling of appending to /boot/firmaware/config.txt and /etc/modules when running intstaller3.sh diff --git a/full_status.sh b/full_status.sh index 3202f03..c059753 100644 --- a/full_status.sh +++ b/full_status.sh @@ -1,6 +1,6 @@ #!/bin/bash # status of services -bash ./status_services.sh +bash ./services.sh status # test pps echo "Testing PPS" diff --git a/reconfig_full.sh b/reconfig_full.sh index 3ead4ba..b42e2e8 100644 --- a/reconfig_full.sh +++ b/reconfig_full.sh @@ -24,7 +24,7 @@ telegraf_new="$1/telegraf.conf" udev_new="$1/50-tty.rules" # stop da services -bash ./stop_services.sh +bash ./services.sh stop # backup conf bash ./dump_configs.sh @@ -38,8 +38,8 @@ sudo bash -c "cat $influxdb_new > $influxdb" sudo bash -c "cat $telegraf_new > $telegraf" sudo bash -c "cat $udev_new > $udev_rule" -# restart da services -bash ./start_services.sh +# start da services +bash ./services.sh start # show services status -# bash ./status_services.sh \ No newline at end of file +# bash ./services.sh status \ No newline at end of file diff --git a/restart_services.sh b/restart_services.sh deleted file mode 100644 index d83e299..0000000 --- a/restart_services.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Restarting Services" -sudo systemctl restart gpsd chrony influxdb telegraf grafana-server syslog-ng \ No newline at end of file diff --git a/services.sh b/services.sh new file mode 100644 index 0000000..d8d3853 --- /dev/null +++ b/services.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +if [ -z $1 ]; then + echo "Usage: bash services.sh stop|start|restart|status|enable" + exit +fi + +echo "Running $1 on Services" +sudo systemctl $1 gpsd chrony influxdb telegraf grafana-server syslog-ng \ No newline at end of file diff --git a/start_services.sh b/start_services.sh deleted file mode 100644 index 5e925ea..0000000 --- a/start_services.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Starting Services" -sudo systemctl start gpsd chrony influxdb telegraf grafana-server syslog-ng \ No newline at end of file diff --git a/status_services.sh b/status_services.sh deleted file mode 100644 index 9ca2c1d..0000000 --- a/status_services.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Services Status" -sudo systemctl status gpsd chrony influxdb telegraf grafana-server syslog-ng diff --git a/stop_services.sh b/stop_services.sh deleted file mode 100644 index f6a6d00..0000000 --- a/stop_services.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "Stopping Services" -sudo systemctl stop gpsd chrony influxdb telegraf grafana-server syslog-ng \ No newline at end of file