Add restic_env_erzeugen.sh
This commit is contained in:
19
restic_env_erzeugen.sh
Normal file
19
restic_env_erzeugen.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Benutzereingabe für AWSuser und AWSkey abfragen
|
||||
read -p "AWS Access Key: " AWSuser
|
||||
read -p "AWS Secret Access Key: " AWSkey
|
||||
read -p "Bucketname Minio: " bucket
|
||||
read -p "Restic Password: " resticpassword
|
||||
|
||||
# Überprüfen, ob die Datei .restiv-env existiert und falls nicht, erstellen
|
||||
rm .restic-env
|
||||
touch .restic-env
|
||||
|
||||
# Werte in die Datei .restiv-env schreiben oder aktualisieren
|
||||
echo "export AWS_ACCESS_KEY_ID=$AWSuser" >> .restic-env
|
||||
echo "export AWS_SECRET_ACCESS_KEY=$AWSkey" >> .restic-env
|
||||
echo "export RESTIC_REPOSITORY=\"s3:https://storage.datenwarehouse.synology.me/$bucket\"" >> .restic-env
|
||||
echo "export RESTIC_PASSWORD=\"$resticpassword\"" >> .restic-env
|
||||
|
||||
echo "Werte wurden erfolgreich in die Datei .restic-env geschrieben."
|
||||
Reference in New Issue
Block a user