Skip to content

Commit

Permalink
attempt of fix to v2fly#182 (v2fly#184)
Browse files Browse the repository at this point in the history
Co-authored-by: IceCodeNew <[email protected]>
  • Loading branch information
nicholascw and IceCodeNew committed Nov 25, 2020
1 parent ecc831a commit 07a829a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions install-dat-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ 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: The user currently executing this script is not root. You may encounter the insufficient privilege error."
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
}

Expand Down
10 changes: 8 additions & 2 deletions install-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ 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: The user currently executing this script is not root. You may encounter the insufficient privilege error."
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
}

Expand Down

0 comments on commit 07a829a

Please sign in to comment.