diff --git a/lib/functions.sh b/lib/functions.sh index a9c9e7b..36e7bf0 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -188,8 +188,7 @@ check_ports() { # Check if ss command exists if command -v ss &> /dev/null; then # Check every port we need if it's in use - #for i in 25 53 80 143 389 587 993 8000; do - for i in 8734; do + for i in 25 53 80 143 389 587 993 8000; do SS=`ss -tulwn | grep LISTEN | awk '{ print $5 }' | awk -F: '{ print $NF }' | grep "^$i$" | head -1` # If port 53 (dns) in use by system-resolvd (Ubuntu) then auto fix if [ "$SS" == 53 ]; then @@ -226,20 +225,22 @@ check_ports() { fi } check_os() { - OSRELEASE=`grep "VERSION=" /etc/os-release | awk -F\" '{ print $2 }'` - if [ "$OSRELEASE" != "22.04 LTS (Jammy Jellyfish)" ]; then + OSRELEASE=`grep "VERSION_ID=" /etc/os-release | awk -F\" '{ print $2 }'` + if [ "$OSRELEASE" != "22.04" ]; then echo -ne "\nFederated requires a minimum of 4G of RAM and 25G of storage\n \ running Ubuntu 22.04 LTS. Your system is not supported. Please contact\n \ Federated @ support@federated.computer for assistance or choose our\n \ cloud offerings at https://cloud.federated.computer.\n\n" + exit 2; fi } check_memory() { MEMTOTAL=`awk '/MemTotal/ { printf "%.3d \n", $2/1024 }' /proc/meminfo` - if [ "$MEMTOTAL" -lt "3900" ]; then + if [ "$MEMTOTAL" -lt "3700" ]; then echo -ne "\nFederated requires a minimum of 4G of RAM and 25G of storage\n \ running Ubuntu 22.04 LTS. Your system is not supported. Please contact\n \ Federated @ support@federated.computer for assistance or choose our\n \ cloud offerings at https://cloud.federated.computer.\n\n" + exit 2; fi }