Elevate script to sudo
Self-elevate script to sudo
:
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
Sources
https://askubuntu.com/a/746351
https://unix.stackexchange.com/a/28793
Self-elevate script to sudo
:
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
https://askubuntu.com/a/746351
https://unix.stackexchange.com/a/28793