Update OneClickDesktop_zh-CN.sh

This commit is contained in:
York Zhao 2024-07-23 09:10:02 +08:00 committed by GitHub
parent 6cecc1c7dc
commit d571795514
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -817,8 +817,34 @@ function install_reverse_proxy
fi
systemctl stop caddy
say @B"Caddy安装成功" green
if [ "x$confirm_letsencrypt" = "xY" ] || [ "x$confirm_letsencrypt" = "xy" ] ; then
cat > /etc/caddy/Caddyfile <<END
if [ "x$confirm_letsencrypt" = "xY" ] || [ "x$confirm_letsencrypt" = "xy" ] ; then
cat > /etc/caddy/Caddyfile << END
{
log caddy_log {
output {
file /etc/caddy/caddy.log
}
}
# TLS options
email $le_email
}
$guacamole_hostname {
reverse_proxy localhost:8080/guacamole
}
END
systemctl start caddy
echo
if [ -f /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/$guacamole_hostname/$guacamole_hostname.crt ] ; then
say @B"恭喜Let's Encrypt SSL证书安装成功" green
say @B"开始使用您的远程桌面,请在浏览器中访问 https://${guacamole_hostname}!" green
else
say "Let's Encrypt SSL证书安装失败。" red
say @B"请查看caddy 日志,位于/etc/caddy/caddy.log" yellow
say @B"开始使用您的远程桌面,请在浏览器中访问 http://${guacamole_hostname}!" green
fi
else
cat > /etc/caddy/Caddyfile << END
{
log caddy_log {
output {
@ -827,44 +853,14 @@ function install_reverse_proxy
}
# TLS options
email $le_email
}
$guacamole_hostname {
reverse_proxy localhost:8080/guacamole
}
END
systemctl start caddy
echo
if [ -f /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/$guacamole_hostname/$guacamole_hostname.crt ] ; then
say @B"恭喜Let's Encrypt SSL证书安装成功" green
say @B"开始使用您的远程桌面,请在浏览器中访问 https://${guacamole_hostname}!" green
else
say "Let's Encrypt SSL证书安装失败。" red
say @B"请查看caddy 日志,位于/etc/caddy/caddy.log" yellow
say @B"开始使用您的远程桌面,请在浏览器中访问 http://${guacamole_hostname}!" green
fi
else
cat >> /etc/caddy/Caddyfile <<END
{
log caddy_log {
output {
file /etc/caddy/caddy.log
}
}
# TLS options
email $le_email
auto_https off
auto_https off
}
$guacamole_hostname {
reverse_proxy localhost:8080/guacamole
}
END
say @B"Let's Encrypt证书未安装如果您之后需要安装Let's Encrypt证书请手动更改Caddyfile位于/etc/caddy/Caddyfile"." yellow
say @B"Let's Encrypt证书未安装如果您之后需要安装Let's Encrypt证书请手动执行 \"certbot --nginx --agree-tos --redirect --hsts --staple-ocsp -d $guacamole_hostname\"." yellow
END
say @B"Let's Encrypt证书未安装如果您之后需要安装Let's Encrypt证书请手动更改Caddyfile位于/etc/caddy/Caddyfile"." yellow
say @B"开始使用您的远程桌面,请在浏览器中访问 http://${guacamole_hostname}!" green
fi
say @B"您的Guacamole用户名是$guacamole_username您的Guacamole密码是$guacamole_password_prehash." green