attempt of fix to #182 (#184)

Co-authored-by: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com>
pull/186/head
Nicholas Wang 2020-11-25 13:38:44 -06:00 committed by IceCodeNew
parent ecc831a341
commit 07a829acf0
2 changed files with 16 additions and 4 deletions

View File

@ -29,8 +29,14 @@ curl() {
check_if_running_as_root() { check_if_running_as_root() {
# If you want to run as another user, please modify $UID to be owned by this user # If you want to run as another user, please modify $UID to be owned by this user
if [[ "$UID" -ne '0' ]]; then if [[ "$UID" -ne '0' ]]; then
echo "error: You must run this script as root!" echo "WARNING: The user currently executing this script is not root. You may encounter the insufficient privilege error."
exit 1 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 fi
} }

View File

@ -47,8 +47,14 @@ systemd_cat_config() {
check_if_running_as_root() { check_if_running_as_root() {
# If you want to run as another user, please modify $UID to be owned by this user # If you want to run as another user, please modify $UID to be owned by this user
if [[ "$UID" -ne '0' ]]; then if [[ "$UID" -ne '0' ]]; then
echo "error: You must run this script as root!" echo "WARNING: The user currently executing this script is not root. You may encounter the insufficient privilege error."
exit 1 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 fi
} }