smtp and roundcube was added
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-19 15:43:26 +00:00
parent cd75431a03
commit f1bb3492ca
2 changed files with 121 additions and 9 deletions

View File

@@ -15,6 +15,7 @@ if [ "$ORGANIZATION" == "" ]; then
fi
if [[ "$NEXTCLOUD" == "yes" ]]; then
echo "Nextcloud install has started from ssh://$GIT_REPO/$ORGANIZATION/nextcloud.git";
DB_MYSQL="$(echo $RANDOM | md5sum | head -c 8)";
DB_USER="$(echo $RANDOM | md5sum | head -c 8)";
@@ -93,6 +94,7 @@ if [[ "$BITWARDEN" == "yes" ]]; then
fi;
if [[ "$GUACAMOLE" == "yes" ]]; then
echo "Guacamole install has started from ssh://$GIT_REPO/$ORGANIZATION/guacamole.git";
DB_MYSQL="$(echo $RANDOM | md5sum | head -c 8)";
DB_USER="$(echo $RANDOM | md5sum | head -c 8)";
@@ -118,15 +120,44 @@ if [[ "$GUACAMOLE" == "yes" ]]; then
cp -rv /tmp/guacamole/firewall-guacamole.json $SERVICE_DIR/firewall-guacamole.json;
fi;
if [[ "$SMTP" == "yes" ]]; then
echo "SMTP service install has started from ssh://$GIT_REPO/$ORGANIZATION/smtp.git";
git clone ssh://$GIT_REPO/$ORGANIZATION/smtp.git /tmp/smtp
cp -rv /tmp/smtp/smtp-secret.json /etc/user/secret/smtp.json;
cp -rv /tmp/smtp/smtp.json $SERVICE_DIR/smtp.json;
cp -rv /tmp/smtp/firewall-smtp.json $SERVICE_DIR/firewall-smtp.json;
fi;
if [[ "$ROUNDCUBE" == "yes" ]]; then
DB_MYSQL="$(echo $RANDOM | md5sum | head -c 8)";
DB_USER="$(echo $RANDOM | md5sum | head -c 8)";
DB_PASSWORD="$(echo $RANDOM | md5sum | head -c 10)";
DB_ROOT_PASSWORD="$(echo $RANDOM | md5sum | head -c 10)";
git clone ssh://$GIT_REPO/$ORGANIZATION/roundcube.git /tmp/roundcube;
sed -i "s/DEFAULT_HOST/$ROUNDCUBE_IMAP_HOST/g" /tmp/roundcube/roundcube-secret.json
sed -i "s/DEFAULT_PORT/$ROUNDCUBE_IMAP_PORT/g" /tmp/roundcube/roundcube-secret.json
sed -i "s/SMTP_SERVER/$ROUNDCUBE_SMTP_HOST/g" /tmp/roundcube/roundcube-secret.json
sed -i "s/SMTP_PORT/$ROUNDCUBE_SMTP_PORT/g" /tmp/roundcube/roundcube-secret.json
#sed -i "s/SMTP_SECURITY/$SMTP_SECURITY/g" /tmp/roundcube/roundcube-secret.json
#sed -i "s/SMTP_AUTHMECHANISM/$SMTP_AUTH_MECHANISM/g" /tmp/roundcube/roundcube-secret.json
sed -i "s/UPLOAD_MAX_FILESIZE/$ROUNDCUBE_UPLOAD_MAX_FILESIZE/g" /tmp/roundcube/roundcube-secret.json
sed -i "s/DB_MYSQL/$DB_MYSQL/g" /tmp/roundcube/roundcube-secret.json;
sed -i "s/DB_USER/$DB_USER/g" /tmp/roundcube/roundcube-secret.json;
sed -i "s/DB_PASSWORD/$DB_PASSWORD/g" /tmp/roundcube/roundcube-secret.json;
sed -i "s/DB_ROOT_PASSWORD/$DB_ROOT_PASSWORD/g" /tmp/roundcube/roundcube-secret.json;
sed -i "s#DOMAIN#$ROUNDCUBE_DOMAIN#g" /tmp/roundcube/roundcube-secret.json
cp -rv /tmp/roundcube/roundcube-secret.json /etc/user/secret/roundcube.json;
cp -rv /tmp/roundcube/roundcube.json $SERVICE_DIR/roundcube.json;
fi;
#if [[ "$NEXTCLOUD" == "yes" ] || [ "$BITWARDEN" == "yes" ]]; then
# echo "SMTP service install has started from ssh://$GIT_REPO/$ORGANIZATION/smtp.git";
#
# git clone ssh://$GIT_REPO/$ORGANIZATION/smtp.git /tmp/smtp
#
# cp -rv /tmp/smtp/smtp-secret.json /etc/user/secret/smtp.json;
# cp -rv /tmp/smtp/smtp.json $SERVICE_DIR/smtp.json;
# cp -rv /tmp/smtp/firewall-smtp.json $SERVICE_DIR/firewall-smtp.json;
#fi;