I have a script that requires root privileges. I have to execute it either via sudo or from an account with uid 0 (e.g. root).
If the script is not executed with sufficient rights then I want that script to echo "Run as Root" and exit 1.
How can I achieve this ?