Added check for root

This commit is contained in:
Daniel Schubert 2019-12-13 20:07:39 +00:00
parent c618e9c5aa
commit 7eb93a1028

View File

@ -12,6 +12,12 @@ set -u
# The Wordpress Site is then available at localhost/YOUR_SITENAME # The Wordpress Site is then available at localhost/YOUR_SITENAME
# user: admin pw: admin ( change !! ) # user: admin pw: admin ( change !! )
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
if [[ $# -eq 0 ]] ; then if [[ $# -eq 0 ]] ; then
echo 'Site name required. Exiting ......' echo 'Site name required. Exiting ......'
exit 1 exit 1