#!/bin/bash # Define URLs and file names for the scripts scripts=( "https://scripts.rishek.com/keygen.sh keygen.sh" "https://scripts.rishek.com/addockeruser.sh addockeruser.sh" ) # Loop through the scripts and download each one for script in "${scripts[@]}"; do url=$(echo $script | awk '{print $1}') file=$(echo $script | awk '{print $2}') echo "Downloading $file from $url..." curl -fsSL $url -o $file if [[ $? -eq 0 ]]; then echo "Running $file..." sh $file # Run all scripts without sudo else echo "Failed to download $file from $url" fi done echo "All scripts have been processed." # Remove downloaded script files rm *.sh echo "All downloaded files removed." # Restart the session and run docker commands within a subshell echo "Restarting session..." newgrp docker