diff --git a/.gitignore b/.gitignore index edcb3d1..c315551 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /keys /temp -secrets.env -enviroment.env diff --git a/backup.sh b/backup.sh index f57c76d..22ddcd4 100644 --- a/backup.sh +++ b/backup.sh @@ -1,19 +1,17 @@ #!/bin/bash -source ./enviroment/secret.env -source ./enviroment/envireoment.env - # Konfigurationsvariablen -MOUNT_POINT="$ENV_WEBDAV_MOUNT" -SFTP_HOST1="$ENV_SFTP_HOST1" -DOCKER_HOST="$ENV_DOCKER_HOST" +MOUNT_POINT="./webdav/" +DOCKER_HOST="" + +SFTP_HOST1="" # Nutzerdaten -SFTP_USER1="$ENV_SFTP_USER1" +SFTP_USER1="" # Farben für die Ausgabe @@ -62,11 +60,11 @@ function sftptransfer(){ REMOTE_DIR=$3 LOCAL_DIR="./temp" - log "Sicherstellen das "$LOCAL_DIR" existiert" + log "Sicherstellen das $LOCAL_DIR existiert" mkdir -p "$LOCAL_DIR" - log "Lade Datein von "$REMOTE_DIR" herunter" - sftp $REMOTE_USER@$REMOTE_HOST << EOF + log "Lade Datein von $REMOTE_DIR herunter" + sftp "$REMOTE_USER"@"$REMOTE_HOS" << EOF cd $REMOTE_DIR lcd $LOCAL_DIR get -r * diff --git a/enviroment/enviroment-template.env b/enviroment/enviroment-template.env deleted file mode 100644 index 01cd042..0000000 --- a/enviroment/enviroment-template.env +++ /dev/null @@ -1,10 +0,0 @@ -# .env - -ENV_WEBDAV_URL="https://www.kommsafe.de/webdav" -ENV_WEBDAV_MOUNT="/mnt/webdav" -ENV_RCLONE_CONF="/root/.config/rclone/rclone.conf" - -ENV_DOCKER_HOST="" - -ENV_SFTP_HOST1="" -ENV_SFTP_HOST2="" \ No newline at end of file diff --git a/enviroment/enviroment.env b/enviroment/enviroment.env deleted file mode 100644 index 5ac50c4..0000000 --- a/enviroment/enviroment.env +++ /dev/null @@ -1,10 +0,0 @@ -# .env - -ENV_WEBDAV_URL="https://www.kommsafe.de/webdav/Stadt%20K%C3%B6nigsbrunn/IuK/Schilling" -ENV_WEBDAV_MOUNT="./webdav" -ENV_RCLONE_CONF="/root/.config/rclone/rclone.conf" - -ENV_DOCKER_HOST="" - -ENV_SFTP_HOST1="" -ENV_SFTP_HOST2="" \ No newline at end of file diff --git a/enviroment/secrets-template.env b/enviroment/secrets-template.env deleted file mode 100644 index c6806ad..0000000 --- a/enviroment/secrets-template.env +++ /dev/null @@ -1,4 +0,0 @@ -# .env - -WEBDAV_BENUTZER="dein_benutzername" -WEBDAV_PASSWORD="dein_passwort" \ No newline at end of file diff --git a/setup.sh b/setup.sh index d99cc6a..9a8e725 100644 --- a/setup.sh +++ b/setup.sh @@ -1,14 +1,11 @@ #!/bin/bash -source ./enviroment/envireoment.env -source ./enviroment/secret.env - # Variablen -WEBDAV_USER="$ENV_WEBDAV_BENUTZER" -WEBDAV_PASS="$ENV_WEBDAV_PASSWORD" -WEBDAV_URL="$ENV_WEBDAV_URL" -RCLONE_CONFIG="$ENV_RCLONE_CONF" +WEBDAV_USER="tim.schilling@koenigsbrunn.de" +WEBDAV_PASS="HgdKS-P2004!" +WEBDAV_URL="https://www.kommsafe.de/webdav/Stadt%20K%C3%B6nigsbrunn/IuK/Schilling" +RCLONE_CONFIG="/root/.config/rclone/rclone.conf" # Farben für die Ausgabe GREEN="\033[0;32m"