added root check

This commit is contained in:
Asif Bacchus 2019-01-06 01:26:44 -07:00
parent a9ad3f0152
commit c7ea64cd92
2 changed files with 11 additions and 2 deletions

View File

@ -6,13 +6,13 @@
-1,
30,
43,
668,
-1,
-1,
-1,
-1,
-1,
659,
625
-1
]
}
]

View File

@ -62,6 +62,15 @@ tag_phpAddr="<phpAddr>"
tag_phpPort="<phpPort>"
tag_phpVersion="<phpVersion>"
### check running as root, otherwise exit
if [ $(id -u) -ne 0 ]; then
echo -e "\n${err}This script MUST be run as ROOT. Exiting.${norm}"
exit 2
fi
### quick intro for the user
echo -e "\n${mag}This script will customize the provided NGINX template files for your"
echo "environment. You will be prompted for all necessary information. After that,"