Skip to content

Instantly share code, notes, and snippets.

@yesmar
Created February 2, 2018 03:19
Show Gist options
  • Save yesmar/f1e3dcbddf8d3e23179b34df5fcfe653 to your computer and use it in GitHub Desktop.
Save yesmar/f1e3dcbddf8d3e23179b34df5fcfe653 to your computer and use it in GitHub Desktop.
Ensure script is running as root
#!/bin/bash
((EUID != 0)) && printf >&2 "This script should be run as root\\n" && exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment