A new guide has been published: Check if a script is running as root user in Linux
Tecadmin published a quick tutorial about adding a check if a script is running as root user in Linux.
Read more @ Linux Compatible