attempt of fix to #182

pull/184/head
Nicholas Wang 2020-11-25 11:04:06 -06:00
parent cbae6a10b1
commit b33d8e5c2c
No known key found for this signature in database
GPG Key ID: 2B177355BEFCA835
2 changed files with 18 additions and 4 deletions

View File

@ -29,8 +29,15 @@ curl() {
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 "error: You must run this script as root!"
exit 1
echo "Warning: You are root, and you may reach insufficient permission errors."
read -p "Are you sure you want to continue? [y/N] " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
echo "Continuing the installation with current user..."
else
echo "Not running with root, exiting..."
exit 1
fi
fi
}

View File

@ -47,8 +47,15 @@ systemd_cat_config() {
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 "error: You must run this script as root!"
exit 1
echo "Warning: You are root, and you may reach insufficient permission errors."
read -p "Are you sure you want to continue? [y/N] " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
echo "Continuing the installation with current user..."
else
echo "Not running with root, exiting..."
exit 1
fi
fi
}