Mark error messages better, update new clone script
This commit is contained in:
@@ -16,26 +16,26 @@ fi;
|
||||
|
||||
error=0;
|
||||
if [ -z "${GIT_WEBHOOK_BASE_FOLDER}" ]; then
|
||||
echo "Missing GIT_WEBHOOK_BASE_FOLDER entry";
|
||||
echo "[!] Missing GIT_WEBHOOK_BASE_FOLDER entry";
|
||||
error=1;
|
||||
fi;
|
||||
if [ -z "${WWW_GROUP}" ]; then
|
||||
echo "Missing WWW_GROUP entry";
|
||||
echo "[!] Missing WWW_GROUP entry";
|
||||
error=1;
|
||||
elif ! getent group "${WWW_GROUP}" > /dev/null 2>&1; then
|
||||
echo "Group ${WWW_GROUP} does not exist. Is it the Apache web group?";
|
||||
echo "[!] Group ${WWW_GROUP} does not exist. Is it the Apache web group?";
|
||||
error=1;
|
||||
fi;
|
||||
if [ -z "${SUDO_USER}" ]; then
|
||||
echo "Missing SUDO_USER entry";
|
||||
echo "[!] Missing SUDO_USER entry";
|
||||
error=1;
|
||||
elif [ "${USE_SUDO}" = "0" ] && ! id "${SUDO_USER}" &>/dev/null; then
|
||||
echo "SUDO is off, user must exist in system";
|
||||
echo "[!] SUDO is off, user must exist in system";
|
||||
error=1;
|
||||
fi;
|
||||
# this script has to be run as root
|
||||
if [ "$(whoami)" != "root" ]; then
|
||||
echo "Script must be run as root user";
|
||||
echo "[!] Script must be run as root user";
|
||||
error=1;
|
||||
fi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user