From 133e1484adf22b7f3553332af37c962a92aceeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:27:39 +0100 Subject: [PATCH] Refactor (#10277) --- install/ots-install.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/install/ots-install.sh b/install/ots-install.sh index f95a32b61..b94a27a43 100644 --- a/install/ots-install.sh +++ b/install/ots-install.sh @@ -16,11 +16,11 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ redis-server \ - nginx \ - openssl + nginx msg_ok "Installed Dependencies" fetch_and_deploy_gh_release "ots" "Luzifer/ots" "prebuild" "latest" "/opt/ots" "ots_linux_amd64.tgz" +create_self_signed_cert msg_info "Setup OTS" cat </opt/ots/.env @@ -31,14 +31,6 @@ STORAGE_TYPE=redis EOF msg_ok "Setup OTS" -msg_info "Generating Universal SSL Certificate" -mkdir -p /etc/ssl/ots -$STD openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \ - -keyout /etc/ssl/ots/key.pem \ - -out /etc/ssl/ots/cert.pem \ - -subj "/CN=ots" -msg_ok "Certificate Generated" - msg_info "Setting up nginx" cat </etc/nginx/sites-available/ots.conf server { @@ -52,8 +44,8 @@ server { listen [::]:443 ssl; server_name ots; - ssl_certificate /etc/ssl/ots/cert.pem; - ssl_certificate_key /etc/ssl/ots/key.pem; + ssl_certificate /etc/ssl/ots/ots.crt; + ssl_certificate_key /etc/ssl/ots/ots.key; location / { add_header X-Robots-Tag noindex;