check_root.sh 317 B

12345678910111213
  1. #!/bin/bash
  2. # LGSM check_root.sh function
  3. # Author: Daniel Gibbs
  4. # Website: http://gameservermanagers.com
  5. lgsm_version="060316"
  6. if [ $(whoami) = "root" ]; then
  7. fn_printfailnl "Do NOT run this script as root!"
  8. if [ -d "${scriptlogdir}" ]; then
  9. fn_scriptlog "${selfname} attempted to run as root."
  10. fi
  11. exit 1
  12. fi