Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d097f49ca5
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (70 sloc) 2.465 kb
# Read the config so we can show the user what is currently set
. $MODULE_CONFIG
###############################################
# Mailmain CGI GID
###############################################
GET_GID=0
if ! grep -q "MAILMAN_GID" $MODULE_CONFIG; then
if query "Do you want a custom CGI script group for the mailman (must match apache)?" n; then
GET_GID=1
else
MAILMAN_GID="nogroup"
echo "MAILMAN_GID=$MAILMAN_GID" >> $MODULE_CONFIG
fi
else
if query "Change custom CGI group for mailman ($MAILMAN_GID)?" n; then
GET_GID=1
fi
fi
if [ "$GET_GID" == "1" ]; then
IS_THIS_CORRECT=0
while [ "$IS_THIS_CORRECT" == "0" ]; do
echo -en "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}: ${QUERY_COLOR}Enter group name:${DEFAULT_COLOR} "
read -e MAILMAN_GID
if [ "$MAILMAN_GID" == "" ]; then
message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! Error: mailman group name cannot be blank${DEFAULT_COLOR}"
else
if ! grep "^$MAILMAN_GID:.*$" /etc/group; then
message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! WARNING: group '$MAILMAN_GID' does not exist.${DEFAULT_COLOR}"
fi
if query "Is '$MAILMAN_GID' correct?" y; then
IS_THIS_CORRECT=1
fi
fi
done
echo "MAILMAN_GID=$MAILMAN_GID" >> $MODULE_CONFIG
fi
###############################################
# Mailmain MAIL GID
###############################################
GET_GID=0
if ! grep -q "MAIL_GID" $MODULE_CONFIG; then
if query "Do you want a custom MAIL group for mailman (must match mail server)?" n; then
GET_GID=1
else
MAIL_GID=$(id -g nobody)
echo "MAIL_GID=$MAIL_GID" >> $MODULE_CONFIG
fi
else
if query "Change custom MAIL group for mailman ($MAIL_GID)?" n; then
GET_GID=1
fi
fi
if [ "$GET_GID" == "1" ]; then
IS_THIS_CORRECT=0
while [ "$IS_THIS_CORRECT" == "0" ]; do
echo -en "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}: ${QUERY_COLOR}Enter group name:${DEFAULT_COLOR} "
read -e MAIL_GID
if [ "$MAIL_GID" == "" ]; then
message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! Error: mailman group name cannot be blank${DEFAULT_COLOR}"
else
if ! grep "^$MAIL_GID:.*$" /etc/group; then
message "${MODULE_COLOR}${MODULE}:${PROBLEM_COLOR} ! WARNING: group '$MAIL_GID' does not exist.${DEFAULT_COLOR}"
fi
if query "Is '$MAIL_GID' correct?" y; then
IS_THIS_CORRECT=1
fi
fi
done
echo "MAIL_GID=$MAIL_GID" >> $MODULE_CONFIG
fi
Jump to Line
Something went wrong with that request. Please try again.