Added System-Check

This commit is contained in:
Bram Prieshof
2020-07-24 11:05:32 +02:00
parent 5a9e8e796a
commit 4850f29b2b

View File

@@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
##--------------------## ##--------------------##
# Legacy/Main Menu # # Legacy/Main Menu #
##--------------------## ##--------------------##
@@ -157,6 +158,14 @@ done
} }
##----------------##
# System-Check #
##----------------##
if [[ -d /etc/ICTM ]]; then msg " This system has already been installed by Web-V2" && exit; fi
if [[ ! -z $(dpkg -l | cut -d " " -f 3 | grep "^mysql-server") ]] || [[ ! -z $(dpkg -l | cut -d " " -f 3 | grep "nginx") ]] || [[ ! -z $(dpkg -l | cut -d " " -f 3 | grep "apache") ]] || [[ ! -z $(dpkg -l | cut -d " " -f 3 | grep "php") ]] ; then msg " This system has installed packages, Web-V2 is designed for clean systems"; fi
##--------------------------## ##--------------------------##
# Installer-Requirements # # Installer-Requirements #
##--------------------------## ##--------------------------##