Skip to content

Commit

Permalink
Add domain so mumble can use the one from domain + tiny fix for mail
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibec committed Dec 9, 2017
1 parent fc8639d commit 691b1ab
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
1 change: 1 addition & 0 deletions check_process
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions conf/mumble-server.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
#=================================================
Expand Down

0 comments on commit 691b1ab

Please sign in to comment.