[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
References
https://askubuntu.com/questions/746350/request-root-privilege-from-within-a-script/748362
https://unix.stackexchange.com/questions/28791/prompt-for-sudo-password-and-programmatically-elevate-privilege-in-bash-script
https://stackoverflow.com/questions/3976362/bash-scripts-requiring-sudo-password