1748956374
This commit is contained in:
+4
-4
@@ -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
|
||||
Reference in New Issue
Block a user