From f4e2a2e1d8a4232268eb2385b7a34bddb00a7448 Mon Sep 17 00:00:00 2001 From: allan Date: Wed, 29 Oct 2025 12:07:04 +0100 Subject: [PATCH] minor changes --- dokuwikiinstall | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dokuwikiinstall b/dokuwikiinstall index 95930ae..f59f0fb 100755 --- a/dokuwikiinstall +++ b/dokuwikiinstall @@ -18,7 +18,7 @@ hostname="$1" # # Get php-fpm version # -phpfpm=$(systemctl list-units --type=service --all | awk '/php[0-9]+\.[0-9]+-fpm/ {print $1; exit}' | sed 's/\.service//') +phpfpm=$(systemctl list-unit-files --type=service | awk '/php[0-9]+\.[0-9]+-fpm/ {sub(".service",""); print; exit}') if [[ -z "$phpfpm" ]]; then printf "\nUnable to detect php-fpm version. Is PHP-FPM installed?\n\n" ; exit 1 ; fi # @@ -59,7 +59,10 @@ checkservice() { # # Function input check # -inputcheck () { if [[ -z "$1" ]]; then usage ; printf "ERROR: DOMAIN CANNOT BE EMPTY!\n\n" ; exit; fi; } +inputcheck () { + if [[ -z "$1" ]]; then usage ; printf "ERROR: DOMAIN CANNOT BE EMPTY!\n\n" ; exit 1; fi + if [[ "$1" =~ [[:space:]/] ]]; then printf "ERROR: DOMAIN INVALID (no spaces or slashes allowed)\n\n"; exit 1; fi +} # # If Nginx or PHP-Fpm is not running then die. @@ -110,7 +113,7 @@ cat > /tmp/dokuwiki-postinstall <