mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Check privileges much earlier
This commit is contained in:
@@ -28,6 +28,11 @@ cat <<HELP_USAGE
|
||||
HELP_USAGE
|
||||
}
|
||||
|
||||
if ! [ "$(id -u)" = 0 ]; then
|
||||
echo "${0}: This command must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Constants
|
||||
QUIET=false
|
||||
EXITCODE=0
|
||||
@@ -294,11 +299,6 @@ is_tty() {
|
||||
|
||||
# {% endraw %}
|
||||
|
||||
if ! [ "$(id -u)" = 0 ]; then
|
||||
echo "${0}: This command must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts ':hq' OPTION; do
|
||||
case "$OPTION" in
|
||||
h)
|
||||
|
||||
Reference in New Issue
Block a user