ylmathfan
7 天前
发布在闲聊专区
【谈天说地】
test
check_if_running_as_root() { # If you want to run as another user, please modify $UID to be owned by this user if [[ "$UID" -ne '0' ]]; then echo "WARNING: The user currently executing this script is not root. You may encounter the insufficient privilege error." read -r -p "Are you sure you want to continue? [y/n] " cont_without_been_root if [[ x"${cont_without_been_root:0:1}" = x'y' ]]; then echo "Continuing the installation with current user..." else echo "Not running with root, exiting..." exit 1 fi fi}
|
免责声明:本文不代表本站立场,且不构成任何建议,请谨慎对待。
版权声明:作者保留权利,不代表本站立场。