Use the tgz format installation package instead of the zip format

This commit is contained in:
Vincent Hsu 2023-08-06 22:55:38 +08:00
parent 71a52012ce
commit e49e8f749e

View File

@ -15,7 +15,7 @@ else
ARCH=arm
fi
ARCHIVE=ngrok-v3-stable-linux-$ARCH.zip
ARCHIVE=ngrok-v3-stable-linux-$ARCH.tgz
DOWNLOAD_URL=https://bin.equinox.io/c/bNyj1mQVY4c/$ARCHIVE
if [ ! $(which wget) ]; then
@ -28,11 +28,6 @@ if [ ! $(which git) ]; then
exit 1
fi
if [ ! $(which unzip) ]; then
echo 'Please install zip package'
exit 1
fi
if (( $EUID != 0 )); then
echo "Please run as root"
exit 1
@ -56,7 +51,7 @@ sed -i "s/<add_your_token_here>/$1/g" /opt/ngrok/ngrok.yml
cd /opt/ngrok
echo "Downloading ngrok for $ARCH . . ."
wget $DOWNLOAD_URL
unzip $ARCHIVE
tar xzf $ARCHIVE
rm $ARCHIVE
chmod +x ngrok