more updates lol
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 22s

This commit is contained in:
2025-07-26 22:05:36 -03:00
parent 78b706223d
commit cc416e5cd9
2 changed files with 26 additions and 1 deletions

View File

@@ -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 </dev/tty
if [ -z "$ZIP_PASSWORD" ]; then
install_log_error "ERROR: ZIP_PASSWORD cannot be empty"
exit 1
@@ -233,6 +236,24 @@ install_script() {
fi
install_log_info "Setting permissions for $META_DIR and $TMP_DIR to 777"
chmod -R 777 "$META_DIR" "$TMP_DIR"
install_log_ok "Directories checked and are ok"
# Check for existing .sha256 files, if there are any, prompt to remove them
install_log_info "Verifying existing .sha256 files in $META_DIR"
for file in "$META_DIR"/*; do
if [ -f "$file" -a -name "*.sha256" ]; then
install_log_info "Found .sha256 file: \e[96m\e[4m$file\e[0m"
read -p "Do you want to remove this file? [y/N]: " choice </dev/tty
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
install_log_info "Removing $file"
rm "$file"
else
install_log_info "Skipping $file"
fi
fi
done
install_log_ok "Existing .sha256 files checked"
install_log_separator
install_log_info "Setting up rclone configuration"