deSEC-DNS-GUI/install.sh

34 lines
792 B
Bash
Raw Normal View History

2021-09-25 22:40:55 +00:00
#!/usr/bin/env bash
if [ -f ./functions.sh ]; then
. ./functions.sh
else
echo "functions.sh does not exists"
exit 1
fi
###### Prepare Environement ######
setColors
prepare_screen
package_manager_detect
show_ascii_berry
######## FIRST CHECK ########
# Must be root to install
echo ":::"
if [[ $EUID -eq 0 ]];then
echo "::: You are root."
else
echo "::: sudo will be used for the install."
# Check if it is actually installed
# If it isn't, exit because the install cannot complete
if [[ $(command -v sudo) ]];then
export SUDO="sudo"
export SUDOE="sudo -E"
else
echo "::: Please install sudo or run this as root."
exit 1
fi
fi
printf ":::\\n\\n"
# Check for dependencies
install_dependencies whiptail
install_path=$(whiptail --inputbox "Text" "${r}" "${c}" 2>&1 >/dev/tty)