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,9 +29,16 @@ 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: 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 exit 1
fi fi
fi
} }
download_files() { download_files() {

View File

@ -47,9 +47,16 @@ 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: 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 exit 1
fi fi
fi
} }
identify_the_operating_system_and_architecture() { identify_the_operating_system_and_architecture() {