CMESpectrumBench / server /setup_ngrok.sh
jingene's picture
Add files using upload-large-folder tool
479b033 verified
Raw History Blame Contribute Delete
742 Bytes
#!/bin/bash
# Set install dir
INSTALL_DIR="$HOME/bin"
# Download ngrok v3
echo "Downloading ngrok v3..."
wget -q https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz -O ngrok.tgz
# Unpack and move to ~/bin
echo "Installing to $INSTALL_DIR..."
mkdir -p "$INSTALL_DIR"
tar -xzf ngrok.tgz || { echo "❌ Failed to extract ngrok.tgz"; exit 1; }
mv ngrok "$INSTALL_DIR/ngrok"
rm ngrok.tgz
# Add to PATH if not already there
if ! grep -q 'export PATH="$HOME/bin:$PATH"' "$HOME/.bashrc"; then
echo 'export PATH="$HOME/bin:$PATH"' >> "$HOME/.bashrc"
echo "Added ngrok to PATH in .bashrc"
fi
# Source the new path for this session
export PATH="$HOME/bin:$PATH"
# Verify install
echo "Installed ngrok version:"
ngrok version