index
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
laci
2024-07-04 11:22:56 +02:00
parent f972e215ff
commit cf85dc8554
2 changed files with 26 additions and 72 deletions

View File

@@ -178,6 +178,14 @@
<script>
jQuery(document).ready(function(){
jQuery('select#smarthost').click(function() {
if (jQuery(this).val()=='Y') jQuery('#div_smarthost').show();
else jQuery('#div_smarthost').hide();
if (jQuery("#smarthost").val()=='N' && jQuery("#localproxy").val()=='Y') {
alert("Warning! Local proxy will not work without smarthost proxy service.");
}
});
jQuery('select#vpn').click(function() {
if (jQuery(this).val()=='Y') jQuery('#div_vpn').show();
else jQuery('#div_vpn').hide();

View File

@@ -2,14 +2,6 @@
ask_envs() {
echo "Smarthost proxy? (Y/n)";
read -r ANSWER;
if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then
SMARTHOST_PROXY="no";
else
SMARTHOST_PROXY="yes";
echo "Please fill in the domain name: (localhost)";
read -r DOMAIN;
if [ "$DOMAIN" == "" ]; then
DOMAIN="localhost";
fi
@@ -20,18 +12,7 @@ ask_envs() {
echo "Warning! It seems it's not a FQDN. Self-signed certificate will be created only.";
SELF_SIGNED_CERTIFICATE="true";
fi;
fi
echo "Local proxy? (Y/n)";
read -r ANSWER;
if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then
LOCAL_PROXY="no";
else
LOCAL_PROXY="yes";
if [ "$SMARTHOST_PROXY" == "no" ]; then
echo "Warning! Local proxy will not work without smarthost proxy service.";
fi;
fi
echo "VPN proxy? (Y/n)";
read -r ANSWER;
@@ -40,17 +21,7 @@ ask_envs() {
else
VPN_PROXY="yes";
while true; do
echo "Please add domain url to download the VPN hash from (default: https://demo.format.hu): ";
read -r VPN_DOMAIN;
if [ "$VPN_DOMAIN" == "" ]; then
VPN_DOMAIN="https://demo.format.hu";
fi;
VPN_KEY="";
echo "Please type in the generated VPN passkey (8 digits):";
while read -r VPN_PASS; do
if [ "$VPN_PASS" != "" ]; then
dateFromServer=$(curl -v --silent https://demo.format.hu/ 2>&1 | grep -i '< date' | sed -e 's/< date: //gi')
VPN_DATE=$(date +"%Y%m%d" -d "$dateFromServer");
@@ -61,7 +32,6 @@ ask_envs() {
HTTP_CODE=$(curl -s -I -w "%{http_code}" $VPN_URL -o /dev/null);
break;
fi;
done
echo "DEBUG: $HTTP_CODE";
if [ "$HTTP_CODE" == "200" ]; then
@@ -84,37 +54,13 @@ ask_envs() {
break;
fi
fi;
done;
if [ "$VPN_PROXY" == "yes" ]; then
echo "Please add the letsencrypt mail address:";
while read -r LETSENCRYPT_MAIL; do
if [ "$LETSENCRYPT_MAIL" != "" ]; then
if [ "$(echo "$LETSENCRYPT_MAIL" | grep '@')" != "" ]; then
if [ "$(echo "$LETSENCRYPT_MAIL" | grep '\.')" != "" ]; then
break;
fi;
fi;
fi;
echo "Invalid email address.";
done
echo "Please add letsencrypt server name (default is letsencrypt but you can add zerossl too):";
read -r LETSENCRYPT_SERVERNAME;
if [ "$LETSENCRYPT_SERVERNAME" = "" ]; then
LETSENCRYPT_SERVERNAME="letsencrypt";
fi;
fi;
fi
echo "Cron? (Y/n)";
read -r ANSWER;
if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then
CRON="no";
else
CRON="yes";
fi
}
discover_services() {