mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-03-31 06:33:56 -04:00
✨ feat: Add user choice menu to setup script (#28)
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user