1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mumbleserver_ynh.git synced 2024-09-03 19:46:03 +02:00

Add domain so mumble can use the one from domain + tiny fix for mail

This commit is contained in:
Jean-Baptiste Holcroft 2017-12-09 15:42:01 +01:00
parent fc8639d23d
commit 691b1abb77
5 changed files with 30 additions and 12 deletions

View file

@ -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"

View file

@ -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.

View file

@ -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",

View file

@ -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

View file

@ -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
#=================================================