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

Move send readme to add to the end, add +ynh_backup_if_checksum_is_different

This commit is contained in:
Jean-Baptiste Holcroft 2018-08-08 23:51:33 +02:00
parent 10d2d351fd
commit 80a8d5b840
2 changed files with 46 additions and 37 deletions

View file

@ -101,23 +101,6 @@ ynh_store_file_checksum "$mumble_conf"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# Start services
#=================================================
message="
Port : $port
Password to join server: $server_password
SuperUser Password : $su_passwd
Welcome text : $welcometext
Root channel (your mumble server name): $registerName
Final path (where to find your files) : $final_path
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
"
ynh_send_readme_to_admin "$message"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -158,3 +141,24 @@ systemctl disable mumble-server
yunohost service add "$app" -l "/var/log/mumble-server/$app.log" yunohost service add "$app" -l "/var/log/mumble-server/$app.log"
systemctl restart "$app" systemctl restart "$app"
#=================================================
# SEND README TO ADMIN
#=================================================
message="
Port : $port
Password to join server: $server_password
SuperUser Password : $su_passwd
Welcome text : $welcometext
Root channel (your mumble server name): $registerName
Final path (where to find your files) : $final_path
Mumble configuration file : $mumble_conf
Note about config file: this package will regenerate the config file on upgrade.
If you changed it manually and upgrade mumble, you'll find a backup in $final_path.
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
"
ynh_send_readme_to_admin "$message"

View file

@ -122,6 +122,8 @@ mkdir -p $final_path
# Configuring with given settings # Configuring with given settings
mumble_conf="$final_path/mumble-server.ini" mumble_conf="$final_path/mumble-server.ini"
ynh_backup_if_checksum_is_different "$mumble_conf"
cp ../conf/mumble-server.ini "$mumble_conf" cp ../conf/mumble-server.ini "$mumble_conf"
ynh_replace_string "__FINALPATH__" "$final_path" "$mumble_conf" ynh_replace_string "__FINALPATH__" "$final_path" "$mumble_conf"
@ -141,26 +143,6 @@ ynh_store_file_checksum "$mumble_conf"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# Start services
#=================================================
message="
Mumbleserver was updated!
Port : $port
Password to join server: $server_password
SuperUser Password : $su_passwd
Welcome text : $welcometext
Root channel (your mumble server name): $registerName
Final path (where to find your files) : $final_path
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
"
ynh_send_readme_to_admin "$message"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -200,3 +182,26 @@ systemctl disable mumble-server
yunohost service add "$app" -l "/var/log/mumble-server/$app.log" yunohost service add "$app" -l "/var/log/mumble-server/$app.log"
systemctl restart "$app" systemctl restart "$app"
#=================================================
# SEND README TO ADMIN
#=================================================
message="
Mumbleserver was updated!
Port : $port
Password to join server: $server_password
SuperUser Password : $su_passwd
Welcome text : $welcometext
Root channel (your mumble server name): $registerName
Final path (where to find your files) : $final_path
Mumble configuration file : $mumble_conf
Note about config file: this package will regenerate the config file on upgrade.
If you changed it manually and upgrade mumble, you'll find a backup in $final_path.
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
"
ynh_send_readme_to_admin "$message"