Bash_Scripts/Templates/Functions/Check-Root.bash

6 lines
110 B
Bash
Raw Permalink Normal View History

2021-08-03 18:24:40 -05:00
#!/bin/bash
check_root() {
[[ "$(id -u)" = 0 ]] || (echo "Root permissions required, exiting" && exit 1)
}