more improvements
This commit is contained in:
20
install.sh
20
install.sh
@@ -18,31 +18,33 @@
|
|||||||
# osInfo[/etc/SuSE-release]=zypp
|
# osInfo[/etc/SuSE-release]=zypp
|
||||||
# osInfo[/etc/debian_version]=apt-get
|
# osInfo[/etc/debian_version]=apt-get
|
||||||
# osInfo[/etc/alpine-release]=apk
|
# osInfo[/etc/alpine-release]=apk
|
||||||
|
NEEDED_DEPS=(curl whiptail)
|
||||||
if [ -x "$(command -v apt-get)" ]
|
if [ -x "$(command -v apt-get)" ]
|
||||||
then
|
then
|
||||||
sudo apt-get install curl
|
sudo apt-get install "${NEEDED_DEPS[@]}" -y
|
||||||
elif [ -x "$(command -v apk)" ]
|
elif [ -x "$(command -v apk)" ]
|
||||||
then
|
then
|
||||||
sudo apk add --no-cache curl
|
sudo apk add --no-cache "${NEEDED_DEPS[@]}"
|
||||||
elif [ -x "$(command -v dnf)" ]
|
elif [ -x "$(command -v dnf)" ]
|
||||||
then
|
then
|
||||||
sudo dnf install curl
|
sudo dnf install "${NEEDED_DEPS[@]}"
|
||||||
elif [ -x "$(command -v zypper)" ]
|
elif [ -x "$(command -v zypper)" ]
|
||||||
then
|
then
|
||||||
sudo zypper install curl
|
sudo zypper install "${NEEDED_DEPS[@]}"
|
||||||
elif [ -x "$(command -v pacman)" ]
|
elif [ -x "$(command -v pacman)" ]
|
||||||
then
|
then
|
||||||
sudo pacman -S install curl
|
sudo pacman -S install "${NEEDED_DEPS[@]}"
|
||||||
elif [ -x "$(command -v yum)" ]
|
elif [ -x "$(command -v yum)" ]
|
||||||
then
|
then
|
||||||
sudo yum install curl
|
sudo yum install "${NEEDED_DEPS[@]}"
|
||||||
elif [ -x "$(command -v emerge)" ]
|
elif [ -x "$(command -v emerge)" ]
|
||||||
then
|
then
|
||||||
sudo emerge -av curl
|
sudo emerge -av "${NEEDED_DEPS[@]}"
|
||||||
else
|
else
|
||||||
echo "FAILED TO INSTALL PACKAGE! Package manager not found. You must manually install: curl"
|
echo "FAILED TO INSTALL PACKAGE! Package manager not found. You must manually install: ${NEEDED_DEPS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# We need to source directly from the Github repo to be able to use the functions here
|
# We need to source directly from the Github repo to be able to use the functions here
|
||||||
# shellcheck disable=2034,2059,2164
|
# shellcheck disable=2034,2059,2164
|
||||||
true
|
true
|
||||||
@@ -62,10 +64,8 @@ root_check
|
|||||||
get_wanip4
|
get_wanip4
|
||||||
|
|
||||||
# Install needed dependencies
|
# Install needed dependencies
|
||||||
install_linux_package curl
|
|
||||||
install_linux_package unzip
|
install_linux_package unzip
|
||||||
install_linux_package tar
|
install_linux_package tar
|
||||||
install_linux_package whiptail
|
|
||||||
install_linux_package dnsutils
|
install_linux_package dnsutils
|
||||||
install_linux_package ufw
|
install_linux_package ufw
|
||||||
install_linux_package bind
|
install_linux_package bind
|
||||||
|
|||||||
Reference in New Issue
Block a user