From 3e77a5453515bc42b93bb2553b0f8265ccc862a9 Mon Sep 17 00:00:00 2001 From: laci Date: Thu, 4 Jul 2024 15:51:38 +0200 Subject: [PATCH] temp installer --- install.php | 19 ++++++++++++ install.sh | 89 ++--------------------------------------------------- 2 files changed, 22 insertions(+), 86 deletions(-) diff --git a/install.php b/install.php index b0d4682..caaa186 100644 --- a/install.php +++ b/install.php @@ -60,7 +60,26 @@ putenv('ADDITIONAL='.$_POST["additional"]); # $SMTP_USERNAME" != "" ]; then # $SMTP_PASSWORD" != "" ]; then # $DOMAINS_WHITELIST" != "" ]; then +/* + if [ "$GUACAMOLE_DOMAIN" != "" ]; then + if [ "$GUACAMOLE_ADMIN_NAME" != "" ]; then + if [ "$GUACAMOLE_ADMIN_PASSWORD" != "" ]; then + TOTP_USE="true"; # if yes + BAN_DURATION="5"; + $ROUNDCUBE_IMAP_HOST" != "" ]; then + if [ "$ROUNDCUBE_IMAP_PORT" == "" ]; then + ROUNDCUBE_IMAP_PORT="143"; + fi; + if [ "$ROUNDCUBE_SMTP_HOST" != "" ]; then + if [ "$ROUNDCUBE_SMTP_PORT" == "" ]; then + ROUNDCUBE_SMTP_PORT="25"; + fi; + if [ "$ROUNDCUBE_UPLOAD_MAX_FILESIZE" == "" ]; then + ROUNDCUBE_UPLOAD_MAX_FILESIZE="50M"; + fi; + $ROUNDCUBE_DOMAIN + */ // check ENV variables $output = shell_exec("set"); diff --git a/install.sh b/install.sh index b705ba2..52577e9 100755 --- a/install.sh +++ b/install.sh @@ -353,93 +353,10 @@ ask_additionals() { NEXTCLOUD="yes"; BITWARDEN="yes"; + GUACAMOLE="yes"; + SMTP="yes"; + ROUNDCUBE="yes"; - echo "Do you want to install Guacamole? (Y/n)"; - read -r ANSWER; - if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ] || [ "$ANSWER" == "" ]; then - GUACAMOLE="yes"; - - echo "Please add Guacamole domain: "; - while read -r GUACAMOLE_DOMAIN; do - if [ "$GUACAMOLE_DOMAIN" != "" ]; then - break; - fi; - done - - echo "Please add Guacamole admin username: "; - while read -r GUACAMOLE_ADMIN_NAME; do - if [ "$GUACAMOLE_ADMIN_NAME" != "" ]; then - break; - fi; - done - - echo "Please add Guacamole admin password: "; - while read -r -s GUACAMOLE_ADMIN_PASSWORD; do - if [ "$GUACAMOLE_ADMIN_PASSWORD" != "" ]; then - break; - fi; - done - - echo "Do you want TOTP via login? (Y/n)"; - read -r TOTP_USE; - if [ "$TOTP_USE" == "" ] || [ "$TOTP_USE" == "y" ] || [ "$TOTP_USE" == "Y" ] ; then - TOTP_USE="true"; - fi; - - echo "Do you want limitation in case invalid login or password? Please add a number how many minutes for deny retry. If you add 0 means it will disabled. If just press enter means limitation will be set 5 minutes by default"; - read -r BAN_DURATION; - if [ "$BAN_DURATION" == "" ] ; then - BAN_DURATION="5"; - fi; - fi - -# SMTP="yes"; - - 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; }