This commit is contained in:
Slaviša Arežina
2025-12-24 15:27:39 +01:00
committed by GitHub
parent b22265047c
commit 133e1484ad

View File

@@ -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 <<EOF >/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 <<EOF >/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;