1748956374

This commit is contained in:
2025-06-03 07:12:53 -06:00
parent 9fabc93055
commit b9a7433b7c
6 changed files with 33 additions and 35 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ else
username=$USER
fi
echo "Backing up configs"
echo "Backing up configs..."
dname=./conf-$(date +%s)
@@ -22,15 +22,15 @@ sudo cp /etc/influxdb/influxdb.conf $dname/influxdb.conf
sudo cp /etc/telegraf/telegraf.conf $dname/telegraf.conf
if [ -f /etc/udev/rules.d/50-tty.rules ]; then
echo "/etc/udev/rules.d/50-tty.rules found, copying as well"
echo "/etc/udev/rules.d/50-tty.rules found, copying as well..."
sudo cp /etc/udev/rules.d/50-tty.rules $dname/50-tty.rules
fi
echo "Fixing permissions in $dname"
echo "Fixing permissions in $dname..."
sudo chown -R $username:$username $dname
sudo chmod 775 $dname
sudo chmod 664 $dname/*
echo "Compressing up and deleting $dname to $dname.tar.gz"
echo "Compressing up and deleting $dname to $dname.tar.gz..."
tar czf $dname.tar.gz $dname
rm -rf $dname