Posted By

beaknit on 02/11/11


Tagged

Shell Bash


Versions (?)

Check for root


 / Published in: Bash
 

  1. if [[ $EUID -ne 0 ]]; then
  2. echo "This script must be run as root"
  3. exit 1
  4. fi

Report this snippet  

You need to login to post a comment.