diff --git a/check_process b/check_process index eb07c79..ed6a303 100644 --- a/check_process +++ b/check_process @@ -1,6 +1,7 @@ ;; Test complet auto_remove=1 ; Manifest + domain="domain.tld" (DOMAIN) server_login_password="super_secret_password" (PASSWORD) password="super_secret_password" welcometext="Welcome to my mumble server" diff --git a/conf/mumble-server.ini b/conf/mumble-server.ini index e91f299..7111565 100644 --- a/conf/mumble-server.ini +++ b/conf/mumble-server.ini @@ -157,8 +157,8 @@ registerName=__REGISTER__ # If you have a proper SSL certificate, you can provide the filenames here. # Otherwise, Murmur will create it's own certificate automatically. -#sslCert= -#sslKey= +sslCert=/etc/yunohost/certs/__DOMAIN__/crt.pem +sslKey=/etc/yunohost/certs/__DOMAIN__/key.pem # If Murmur is started as root, which user should it switch to? # This option is ignored if Murmur isn't started with root privileges. diff --git a/manifest.json b/manifest.json index 142e335..5928468 100644 --- a/manifest.json +++ b/manifest.json @@ -21,6 +21,14 @@ ], "arguments": { "install" : [ + { + "name": "domain", + "type": "domain", + "ask": { + "en": "Choose a domain (used to select the correct certificate)" + }, + "example": "domain.org" + }, { "name": "server_login_password", "type": "password", diff --git a/scripts/_common.sh b/scripts/_common.sh index b938388..5ec091c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,17 +16,17 @@ send_readme_to_admin() { mail_subject="☁️🆈🅽🅷☁️: \`$app\` was just installed!" mail_message=" - This is an automated message from your beloved YunoHost server. +This is an automated message from your beloved YunoHost server. - ----- - Specific information for this application ($app) - ----- - $app_message +----- +Specific information for this application ($app) +----- +$app_message - ----- - Automatic diagnosis data from YunoHost - ----- - $ynh_info +----- +Automatic diagnosis data from YunoHost +----- +$ynh_info " # Email server admin - for ACTION diff --git a/scripts/install b/scripts/install index 321e5e9..890bc6b 100644 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors #================================================= # Retrieve arguments +domain=$YNH_APP_ARG_DOMAIN app=$YNH_APP_INSTANCE_NAME server_password=$YNH_APP_ARG_SERVER_LOGIN_PASSWORD su_passwd=$YNH_APP_ARG_PASSWORD @@ -46,6 +47,7 @@ fi #================================================= # Save app settings +ynh_app_setting_set "$app" domain "$domain" ynh_app_setting_set "$app" server_password "$server_password" ynh_app_setting_set "$app" su_passwd "$su_passwd" ynh_app_setting_set "$app" welcometext "$welcometext" @@ -90,6 +92,7 @@ ynh_replace_string "__WELCOME__" "$welcometext" "$mumble_conf" ynh_replace_string "__PORT__" "$port" "$mumble_conf" ynh_replace_string "__SRV_PWD__" "$server_password" "$mumble_conf" ynh_replace_string "__REGISTER__" "$registerName" "$mumble_conf" +ynh_replace_string "__DOMAIN__" "$domain" "$mumble_conf" #================================================= # SETUP SYSTEMD @@ -126,7 +129,7 @@ mumble configuration file : $mumble_conf Are you facing an issue, want to improve this app or say thank you? Please open a new issue in this project: https://github.com/YunoHost-Apps/mumbleserver_ynh " -send_readme_to_admin $message +send_readme_to_admin "$message" #================================================= # GENERIC FINALIZATION @@ -137,6 +140,12 @@ send_readme_to_admin $message chmod -R 770 "$final_path" chown -R :mumble-server "$final_path" +#================================================= +# Add user to ssl-cert so it can read certificates +#================================================= + +usermod --append --groups ssl-cert mumble-server + #================================================= # Disable default server installed by Debian's package #=================================================