mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-30 06:36:34 +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
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test "root" != "$USER" && exec sudo $0 "$@"
|
if [[ $(id -u) -ne 0 ]]; then echo "Please run as root"; exit 1; fi
|
||||||
|
|
||||||
function msg() {
|
function msg() {
|
||||||
echo ":: $1"
|
echo ":: $1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user