Skip to content

Commit

Permalink
Update csf_installer.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiland committed Mar 19, 2021
1 parent 19b1c42 commit 04765ef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions csf_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ INSTALL_LOG="$TMP/install.log"
ERROR_LOG="$TMP/error.log"

## Checking root access
if [ $EUID -ne 0 ]; then
ee "This script needs root permissions!"
if [[ "$EUID" != 0 ]]; then
echo -e "This action needs root permissions."
echo -e "Please enter your root password...";
cd "$DIR" || exit
su -s "$(which bash)" -c "./$SCRIPT_FILENAME $1"
cd - > /dev/null || exit
exit 0;
fi

# Cleaning up
Expand Down

0 comments on commit 04765ef

Please sign in to comment.