diff --git a/dokuwikiinstall b/dokuwikiinstall index 98317cd..6908893 100755 --- a/dokuwikiinstall +++ b/dokuwikiinstall @@ -1,5 +1,4 @@ #!/usr/bin/env bash -# SPDX-License-Identifier: MIT # Author : Allan Christensen # First Created : 05012022 (DD-MM-YYYY) @@ -12,13 +11,13 @@ if [[ $(id -u) -ne 0 ]]; then echo "" && echo "Must be root or use sudo" && echo "" ; exit 1 ; fi # -# Get php-fpm version +# Get PHP-FPM version # phpfpm=$(systemctl list-unit-files --type=service | awk '/php[0-9]+\.[0-9]+-fpm\.service/ {sub(".service","",$1); print $1; exit}') if [[ -z "$phpfpm" ]]; then printf "\nUnable to detect php-fpm version. Is PHP-FPM installed?\n\n" ; exit 1 ; fi # -# Check if required services are running or not +# Check if required services are running # for svc in nginx "$phpfpm"; do systemctl is-active --quiet "$svc" || { printf "\n%s is not running, cannot continue...\n\n" "${svc^}" ; exit 1 ; }; done @@ -44,7 +43,7 @@ usage () { # if [[ $# -ne 1 ]]; then usage - printf "ERROR: Exactly one argument (the domain ony).\n\n" + printf "ERROR: Exactly one argument (the domain only).\n\n" exit 1 fi @@ -117,14 +116,14 @@ sed -i -- "s/DOMAIN/$hostname/g" /etc/nginx/conf.d/"$hostname".conf sed -i "s/PHPVERSION/$phpfpm/" /etc/nginx/conf.d/"$hostname".conf # -# Restarting Nginx and Phpfpm for changes to take effect +# Restarting Nginx and PHP-FPM for changes to take effect # printf "\nRestarting services...\n" systemctl restart "$phpfpm" systemctl restart nginx # -# Create postinstall script +# Create post-install script # cat > /tmp/dokuwiki-postinstall < /tmp/dokuwiki-postinstall <