mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-30 06:36:34 +00:00
Fix fork bomb if user is not root, don't try to sudo exec it, just fail.
This commit is contained in:
parent
99fb50b2a6
commit
a17b87f2be
@ -16,7 +16,7 @@ if [ -z "$1" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
test "root" != "$USER" && exec sudo $0 "$@"
|
||||
if [[ $(id -u) -ne 0 ]]; then echo "Please run as root"; exit 1; fi
|
||||
|
||||
function msg() {
|
||||
echo ":: $1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user