From 813d29bbb3acb63a02f60c1bc69bed0de0da2fa2 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Tue, 28 Apr 2020 20:37:43 +0200 Subject: [PATCH] don't allow to restart network if requirements are not fulfilled --- lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib.sh b/lib.sh index 240514ea..a68bc5b2 100644 --- a/lib.sh +++ b/lib.sh @@ -378,6 +378,7 @@ calculate_max_children() { } test_connection() { +check_distro_version # Install dnsutils if not existing if ! dpkg-query -W -f='${Status}' "dnsutils" | grep -q "ok installed" then @@ -545,7 +546,6 @@ fi check_distro_version() { # Check Ubuntu version -print_text_in_color "$ICyan" "Checking server OS and version..." if lsb_release -sc | grep -ic "bionic" &> /dev/null || lsb_release -sc | grep -ic "focal" &> /dev/null then OS=1 @@ -671,6 +671,7 @@ sudo -u www-data php "$NCPATH"/occ "$@"; } network_ok() { + check_distro_version print_text_in_color "$ICyan" "Testing if network is OK..." if ! netplan apply then