Add Styleized Scrollbar Globally

This commit is contained in:
2025-07-06 02:13:41 -04:00
parent 3978cb32d8
commit ebd047ff75
3 changed files with 101 additions and 0 deletions

56
connectMC Normal file
View File

@@ -0,0 +1,56 @@
# Function to start holesail
start_holesail() {
holesail --host 0.0.0.0 --port "$port" "$connection_hash"
}
# Function to start holesail in pm2
start_holesail_pm2() {
pm2 start holesail --name holesail-mc-port-"$port" -- -p "$port" --host 0.0.0.0 "$connection_hash"
}
# 1) Ensure NodeJS is installed
if ! command -v node &> /dev/null; then
echo "NodeJS is not installed. Installing..."
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
fi
# 2) Check if npm packages are installed
packages=("holesail")
install_needed=false
for package in "${packages[@]}"; do
if ! npm list -g "$package" &> /dev/null; then
install_needed=true
break
fi
done
# 3) Install required npm packages if needed
if [ "$install_needed" = true ]; then
echo "Installing npm packages..."
npm install -g holesail@2.0.3
else
echo "npm packages are already installed. Skipping..."
fi
# Check command line options
if [[ "$1" == "--pm2" ]]; then
# Ask user for connection hash
read -p "Please provide a connection hash: " connection_hash
read -p "Please provide a port: " port
# Run holesail in pm2
start_holesail_pm2
else
# Ask user for connection hash and port
read -p "Please provide a connection hash: " connection_hash
read -p "Please provide a connection port: " port
# Run holesail
start_holesail
fi
# Notify user of the selected port
echo "Holesail is running on port: $port"