rootcheck Function

Call this function at the beginning of a bash script to ensure it runs as root. The ”sudo” statement can be replaced with a message telling the user to run as root if automatic execution is not desired.