attempt of fix to #182
parent
cbae6a10b1
commit
b33d8e5c2c
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue