if [[ $EUID != 0 ]]; then
echo -e "[\e[0;35m warn \x1B[0m] This script requires root privileges"
sudo "$0" "$@"
exit $?
fi
參考來源: Armbian
if [[ $EUID != 0 ]]; then
echo -e "[\e[0;35m warn \x1B[0m] This script requires root privileges"
sudo "$0" "$@"
exit $?
fi
參考來源: Armbian