From a0a78a842bff4a59c20365e4011a46c8cdadcae1 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 17 Dec 2020 00:38:18 +0100 Subject: [PATCH] Fix access to TLS certificates --- conf/systemd.service | 2 +- scripts/install | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index adea29e..932c82a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ Environment="PATH=__ENV_PATH__" -ExecStart=__FINALPATH__/./bin/dendrite-monolith-server --tls-cert=server.crt --tls-key=server.key --config=dentrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__ >> /var/log/__APP__/__APP__.log 2>&1 +ExecStart=__FINALPATH__/./bin/dendrite-monolith-server --tls-cert=/etc/yunohost/certs/__DOMAIN__/crt.pem --tls-key=/etc/yunohost/certs/__DOMAIN__/key.pem --config=dentrite.yaml --http-bind-address=:__PORT__ --https-bind-address=:__TLS_PORT__ >> /var/log/__APP__/__APP__.log 2>&1 [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index 97b8db2..7be651a 100755 --- a/scripts/install +++ b/scripts/install @@ -123,6 +123,7 @@ ynh_script_progression --message="Configuring system user..." --time --weight=1 # Create a system user ynh_system_user_create --username=$app +adduser $app ssl-cert #================================================= # SPECIFIC SETUP @@ -150,7 +151,7 @@ ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/den ynh_script_progression --message="Configuring a systemd service..." --time --weight=1 # Create a dedicated systemd config -ynh_add_systemd_config --others_var="port tls_port" +ynh_add_systemd_config --others_var="port tls_port domain" #================================================= # STORE THE CONFIG FILE CHECKSUM