diff --git a/README.md b/README.md index 9883995..2165e73 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A set of bash scripts for installing and managing a WireGuard VPN server. ## Requirements A minimal Debian 12 server install with no extra services or packages installed. -It is recommended to first install base-stack which will configure a basic server set up including firewald & fail2ban to secure the server: +Requires base-stack which will configure a basic server set up including firewald & fail2ban to secure the server: https://git.stack-source.com/msb/base-stack ## Install diff --git a/install.sh b/install.sh index 99cb004..9e837cc 100755 --- a/install.sh +++ b/install.sh @@ -21,22 +21,32 @@ fi os_id=`lsb_release -is 2>/dev/null` os_release=`lsb_release -rs 2>/dev/null` if [ $os_id != Debian ] || [ $os_release != 12 ]; then - echo "this installer only runs on Debian 12, bailing out" + echo "This installer only runs on Debian 12, bailing out." exit 1 fi -if [ -d /etc/wiregaurd ]; then - echo "looks like wireguard is already installed, bailing out" +if [[ -d /etc/wiregaurd ]]; then + echo "Looks like wireguard is already installed, bailing out." exit 1 fi -if [ -d /etc/stubby/ ]; then - echo "looks like stubby is already installed, bailing out" +if [[ -d /etc/stubby/ ]]; then + echo "Looks like stubby is already installed, bailing out." exit 1 fi -if [ -d /etc/dnsmasq.d ]; then - echo "looks like dnsmasq is already installed, bailing out" +if [[ -d /etc/dnsmasq.d ]]; then + echo "Looks like dnsmasq is already installed, bailing out." + exit 1 +fi + +if [[ ! -d /etc/firewalld ]]; then + echo "Firewalld is not installed. Did you remember to install base-stack first?" + exit 1 +fi + +if [[ ! -d /etc/fail2ban ]]; then + echo "Fail2Ban is not installed. Did you remember to install base-stack first?" exit 1 fi