mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Exit with an error code if the user isn't root
This commit is contained in:
@@ -295,6 +295,7 @@ is_tty() {
|
|||||||
|
|
||||||
if ! [ "$(id -u)" = 0 ]; then
|
if ! [ "$(id -u)" = 0 ]; then
|
||||||
echo "${0}: This command must be run as root"
|
echo "${0}: This command must be run as root"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts ':hq' OPTION; do
|
while getopts ':hq' OPTION; do
|
||||||
|
|||||||
Reference in New Issue
Block a user