From 6718f4d906cac533d0339b2bcf8779edcea07465 Mon Sep 17 00:00:00 2001 From: Christopher <1289128+dragonfire1119@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:54:07 -0600 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20user=20choice=20menu?= =?UTF-8?q?=20to=20setup=20script=20(#28)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a user choice menu to the setup script, allowing the user to either run the full setup or only execute the chown commands. This provides more flexibility and control for the user during the setup process. --- setup-pterodactyl-wings/run.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/setup-pterodactyl-wings/run.sh b/setup-pterodactyl-wings/run.sh index d0e216c..ad99ee4 100644 --- a/setup-pterodactyl-wings/run.sh +++ b/setup-pterodactyl-wings/run.sh @@ -9,6 +9,34 @@ fi UUID=$1 +# Display menu for user choice +echo "Please select an option:" +echo "1) Run full setup" +echo "2) Run chown commands only" +read -p "Enter your choice (1 or 2): " choice + +case $choice in + 1) + echo "Running full setup..." + ;; + 2) + # Create required directories + echo "Creating required directories..." + mkdir -p "/var/lib/pterodactyl/volumes" + mkdir -p "/tmp/pterodactyl" + mkdir -p "/etc/pterodactyl" + mkdir -p "/var/log/pterodactyl" + echo "Running chown commands only..." + chown -R 988:988 /tmp/pterodactyl /etc/pterodactyl /var/log/pterodactyl /var/lib/pterodactyl + echo "Chown commands completed." + exit 0 + ;; + *) + echo "Invalid choice. Please run the script again and select 1 or 2." + exit 1 + ;; +esac + # Function to check if a subnet is in use is_subnet_in_use() { local subnet=$1