mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
Merge pull request #165 from izmailoff/patch-1
Fix fork bomb if user is not root, don't try to sudo exec it, just fail.
This commit is contained in:
commit
4bfe33f955
@ -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