[fix] The install should be more streamlined #2

Open
alban wants to merge 4 commits from feature-install into master
Showing only changes of commit 88998abde7 - Show all commits

View File

@ -4,10 +4,10 @@
[[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; } [[ 0 -ne $UID ]] && { echo "Must run as root. Exiting."; exit; }
# Require a user for exploitation # Require a user for exploitation
DEFAULT=$(getent group 1000|cut -d: -f1) DEFAULT=$(getent passwd 1000|cut -d: -f1)
read -e -i "$DEFAULT" -p "Please provide the system user who will own the project: " USER read -e -i "$DEFAULT" -p "Please provide the system user who will own the project: " USER
getent group "$USER" &>/dev/null || { echo "Sorry, but '$USER' does not exist on this system. Exiting."; exit 2; } getent passwd "$USER" &>/dev/null || { echo "Sorry, but '$USER' does not exist on this system. Exiting."; exit 2; }
# Propose some packages # Propose some packages
echo -e "\nThe following packages are not mandatory, add them as needed.\n" echo -e "\nThe following packages are not mandatory, add them as needed.\n"