smtp and roundcube was added
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
81
install.sh
81
install.sh
@@ -492,6 +492,60 @@ ask_additionals() {
|
||||
fi;
|
||||
fi
|
||||
|
||||
echo "Do you want to install SMTP server? (Y/n)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
|
||||
SMTP="yes";
|
||||
|
||||
|
||||
fi;
|
||||
|
||||
echo "Do you want to install roundcube? (Y/n)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
|
||||
ROUNDCUBE="yes";
|
||||
|
||||
echo "Please add IMAP HOST: ";
|
||||
while read -r ROUNDCUBE_IMAP_HOST; do
|
||||
if [ "$ROUNDCUBE_IMAP_HOST" != "" ]; then
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
|
||||
echo "Please add IMAP PORT (default: 143): ";
|
||||
read -r ROUNDCUBE_IMAP_PORT;
|
||||
if [ "$ROUNDCUBE_IMAP_PORT" == "" ]; then
|
||||
ROUNDCUBE_IMAP_PORT="143";
|
||||
fi;
|
||||
|
||||
echo "Please add SMTP HOST: ";
|
||||
while read -r ROUNDCUBE_SMTP_HOST; do
|
||||
if [ "$ROUNDCUBE_SMTP_HOST" != "" ]; then
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
|
||||
echo "Please add SMTP PORT (587, 465, 25, etc., default: 25): ";
|
||||
read -r ROUNDCUBE_SMTP_PORT;
|
||||
if [ "$ROUNDCUBE_SMTP_PORT" == "" ]; then
|
||||
ROUNDCUBE_SMTP_PORT="25";
|
||||
fi;
|
||||
|
||||
echo "Please add UPLOAD_MAX_FILESIZE (default: 50M): ";
|
||||
read -r ROUNDCUBE_UPLOAD_MAX_FILESIZE;
|
||||
if [ "$ROUNDCUBE_UPLOAD_MAX_FILESIZE" == "" ]; then
|
||||
ROUNDCUBE_UPLOAD_MAX_FILESIZE="50M";
|
||||
fi;
|
||||
|
||||
echo "Please add Roundcube DOMAIN: ";
|
||||
while read -r ROUNDCUBE_DOMAIN; do
|
||||
if [ "$ROUNDCUBE_DOMAIN" != "" ]; then
|
||||
break;
|
||||
fi;
|
||||
done
|
||||
|
||||
fi;
|
||||
|
||||
}
|
||||
|
||||
uninstall() {
|
||||
@@ -806,6 +860,31 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$SMTP" == "yes" ]; then
|
||||
VAR_SMTP="--env SMTP=$SMTP";
|
||||
|
||||
echo "Would you like to run SMTP after install? (Y/n)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ] ; then
|
||||
ADDITIONAL_SERVICES="$ADDITIONAL_SERVICES smtp";
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$ROUNDCUBE" == "yes" ]; then
|
||||
VAR_ROUNDCUBE="--env ROUNDCUBE=$ROUNDCUBE";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_IMAP_HOST=$ROUNDCUBE_IMAP_HOST";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_IMAP_PORT=$ROUNDCUBE_IMAP_PORT";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_SMTP_HOST=$ROUNDCUBE_SMTP_HOST";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_SMTP_PORT=$ROUNDCUBE_SMTP_PORT";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_UPLOAD_MAX_FILESIZE=$ROUNDCUBE_UPLOAD_MAX_FILESIZE";
|
||||
VAR_ROUNDCUBE="$VAR_ROUNDCUBE --env ROUNDCUBE_DOMAIN=$ROUNDCUBE_DOMAIN";
|
||||
|
||||
echo "Would you like to run roundcube after install? (Y/n)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ] ; then
|
||||
ADDITIONAL_SERVICES="$ADDITIONAL_SERVICES roundcube";
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run installer tool
|
||||
$SUDO_CMD docker run \
|
||||
@@ -814,6 +893,8 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then
|
||||
$VAR_NEXTCLOUD \
|
||||
$VAR_BITWARDEN \
|
||||
$VAR_GUACAMOLE \
|
||||
$VAR_SMTP \
|
||||
$VAR_ROUNDCUBE \
|
||||
--volume $HOME/.ssh/installer:/root/.ssh/id_rsa \
|
||||
--volume /etc/user/:/etc/user/ \
|
||||
--volume /etc/system/:/etc/system/ \
|
||||
|
Reference in New Issue
Block a user