19 lines
750 B
Bash
19 lines
750 B
Bash
#!/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." |