From cc416e5cd9cc427c3be432f10b419f05714a45f8 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Sat, 26 Jul 2025 22:05:36 -0300 Subject: [PATCH] more updates lol --- README.md | 4 ++++ nas-gdrive-backup.sh | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bfbf76..32f548a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ When you run the script, you will be prompted to select which scripts you want t This script is used to backup a directory to a remote server using `rsync`. It is intended to be run as a cron job. +#### `nas-gdrive-backup.sh` + +This script is used to both install itself and to run a periodic backup to Google Drive for files that had changed. + ### `clean.sh` This script is used to clean some of the files, docker dangling images, and docker stopped/unused containers. diff --git a/nas-gdrive-backup.sh b/nas-gdrive-backup.sh index b429cc2..b05580e 100644 --- a/nas-gdrive-backup.sh +++ b/nas-gdrive-backup.sh @@ -174,9 +174,12 @@ install_script() { install_log_separator # Check if running as root + install_log_info "Checking if the script is running as root" if [ "$(id -u)" -ne 0 ]; then install_log_error "ERROR: This script must be run as root" exit 1 + else + install_log_ok "Running as root" fi install_log_separator @@ -205,7 +208,7 @@ install_script() { install_log_error "ERROR: ZIP_PASSWORD is not set" exit 1 fi - read -p "Enter ZIP_PASSWORD: " ZIP_PASSWORD + read -p "Enter ZIP_PASSWORD: " ZIP_PASSWORD