1748947261

This commit is contained in:
2025-06-03 04:41:01 -06:00
parent 4fab55f571
commit 7e3798d8af
3 changed files with 8 additions and 9 deletions
+6
View File
@@ -7,9 +7,14 @@ else
username=$USER
fi
echo "Backing up configs"
dname=./conf-$(date +%s)
echo "Making $dname"
mkdir $dname
echo "Copying the config files"
sudo cp /etc/default/gpsd $dname/gpsd
sudo cp /etc/chrony/chrony.conf $dname/chrony.conf
sudo cp /etc/grafana/grafana.ini $dname/grafana.ini
@@ -17,6 +22,7 @@ sudo cp /etc/influxdb/influxdb.conf $dname/influxdb.conf
sudo cp /etc/telegraf/telegraf.conf $dname/telegraf.conf
sudo cp /etc/udev/rules.d/50-tty.rules $dname/50-tty.rules 2> /dev/null
echo "Fixing permissions in $dname"
sudo chown -R $username:$username $dname
sudo chmod 775 $dname
sudo chmod 664 $dname/*
+1 -2
View File
@@ -30,13 +30,12 @@ bash ./stop_services.sh
bash ./dump_configs.sh
# replace dem by truncation
echo "Placing the new config files"
sudo bash -c "cat $gpsd_new > $gpsd"
sudo bash -c "cat $chrony_new > $chrony"
sudo bash -c "cat $grafana_new > $grafana"
sudo bash -c "cat $influxdb_new > $influxdb"
sudo bash -c "cat $telegraf_new > $telegraf"
sudo touch $udev_rule # workaround because weird error
sudo bash -c "cat $udev_new > $udev_rule"
# restart da services
+1 -7
View File
@@ -1,9 +1,3 @@
#!/bin/bash
echo "Restarting Services"
sudo systemctl restart gpsd chrony influxdb telegraf grafana-server syslog-ng
# sudo systemctl restart gpsd
# sudo systemctl restart chrony
# sudo systemctl restart influxdb
# sudo systemctl restart telegraf
# sudo systemctl restart grafana-server
# sudo systemctl restart syslog-ng
sudo systemctl restart gpsd chrony influxdb telegraf grafana-server syslog-ng