From ce09d2af053088d28ebe04316709fa6a378688b0 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Fri, 1 Jul 2022 18:47:48 +0200 Subject: [PATCH] default turn off interactive mode when attace shell into docker --- .bashrc | 12 +++++++----- Dockerfile | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.bashrc b/.bashrc index efe7d0d..2a8f16f 100644 --- a/.bashrc +++ b/.bashrc @@ -91,11 +91,13 @@ function print_container_info { ############################################################################################################################## # Run Code ############################################################################################################################## -find_borg_repo backups/ -export BORG_REPO="${repo_list[selected_repo]}" -if [ ! -z "$BORG_REPO" ]; then - ask_for_repo_password - clear +if [ "$INTERACTIVE_MODE" != "false" ]; then + find_borg_repo backups/ + export BORG_REPO="${repo_list[selected_repo]}" + if [ ! -z "$BORG_REPO" ]; then + ask_for_repo_password + clear + fi fi print_container_info diff --git a/Dockerfile b/Dockerfile index 1bc8269..40344ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ENV USER=borg ENV UID=1000 ENV GID=1000 ENV MAINTENANCE_ENABLE="false" +ENV INTERACTIVE_MODE="false" ENV TZ="" # Add Folders and Shell Scripts