execline-ptrc-extras/elevate

9 lines
164 B
Text
Raw Normal View History

2022-08-05 17:06:16 +00:00
#!/bin/execlineb
backtick -E uid { id -u }
tdefine lift "doas" "sudo" { iscmd doas }
tdefine sucmd "$lift" "exec" { s6-test $uid != 0 }
elgetpositionals
$sucmd
$@