mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-24 22:32:58 +03:00
Truncated history
This commit is contained in:
13
common/elevate.sh
Normal file
13
common/elevate.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
require_root()
|
||||
{
|
||||
local exe
|
||||
echo \* checking privileges
|
||||
[ $(id -u) -ne "0" ] && {
|
||||
echo root is required
|
||||
exe="$EXEDIR/$(basename "$0")"
|
||||
exists sudo && exec sudo sh "$exe"
|
||||
exists su && exec su root -c "sh \"$exe\""
|
||||
echo su or sudo not found
|
||||
exitp 2
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user