Bash_Scripts/Templates/Functions/Check-Root.bash

9 lines
113 B
Bash
Raw Normal View History

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