From c741e26dabc037075a2893d215b857d21d35679b Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 21 Nov 2024 14:27:08 -0800 Subject: [PATCH] limit installer to Debian 12 only --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 3828d94..8f56eb5 100755 --- a/install.sh +++ b/install.sh @@ -5,10 +5,11 @@ if [ "${EUID}" -ne 0 ]; then exit fi -# check for Ubuntu 22.04 (jammy) or Debian 12 (bookworm) -os_codename=`lsb_release -cs` -if [ $os_codename != jammy ] && [ $os_codename != bookworm ]; then - echo "This installer only runs on Ubuntu 22.04 (jammy) or Debian 12 (Bookworm), bailing out." +# check for Debian 12 (bookworm) +os_id=`lsb_release -is` +os_release=`lsb_release -rs` +if [ $os_id != Debian ] || [ $os_release != 12 ]; then + echo "This installer only runs on Debian 12 (Bookworm), bailing out." exit 1 fi @@ -18,7 +19,7 @@ if [ -f "/usr/local/bin/vhost.sh" ]; then exit fi -# check for existing Let's Encrypt install +# check for existing web server software installs if [ -d "/etc/apache2/" ] || [ -d "/etc/php/" ] || [ -d "/etc/varnish/" ]; then echo echo "WARNING: Apache, Varnish and/or PHP are already installed."