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

Fix superuser password

This commit is contained in:
Jean-Baptiste Holcroft 2018-07-29 14:17:59 +02:00
parent 1e6a921153
commit d0af4f6e16
2 changed files with 23 additions and 14 deletions

View file

@ -27,6 +27,7 @@ domain=$YNH_APP_ARG_DOMAIN
app=$YNH_APP_INSTANCE_NAME
welcometext=$YNH_APP_ARG_WELCOMETEXT
registerName=$YNH_APP_ARG_REGISTERNAME
instance_id=$YNH_APP_INSTANCE_NUMBER
server_password=$(ynh_string_random)
su_passwd=$(ynh_string_random)
@ -48,6 +49,7 @@ 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"
ynh_app_setting_set "$app" registerName "$registerName"
ynh_app_setting_set "$app" instance_id "$instance_id"
#=================================================
# STANDARD MODIFICATIONS
@ -99,13 +101,6 @@ ynh_store_file_checksum "$mumble_conf"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# Start services
#=================================================
mkdir -p /var/run/mumble-server/
murmurd -ini "$mumble_conf" -supw "$su_passwd"
#=================================================
# Start services
#=================================================
@ -140,6 +135,13 @@ chown mumble-server /var/run/mumble-server/
usermod --append --groups ssl-cert mumble-server
#=================================================
# Set SuperUser password
#=================================================
mkdir -p /var/run/mumble-server/
murmurd -ini "$mumble_conf" -supw "$su_passwd" "$instance_id"
#=================================================
# Disable default server installed by Debian's package
#=================================================

View file

@ -21,6 +21,7 @@ welcometext=$(ynh_app_setting_get "$app" welcometext)
registerName=$(ynh_app_setting_get "$app" registerName)
port=$(ynh_app_setting_get "$app" port)
final_path=$(ynh_app_setting_get "$app" final_path)
instance_id=$(ynh_app_setting_get "$app" instance_id)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
@ -76,6 +77,12 @@ if [ -z "$domain" ]; then
ynh_app_setting_delete "$app" domain
fi
# Fix multi installation
if [ -z "$instance_id" ]; then
instance_id=$YNH_APP_INSTANCE_NUMBER
ynh_app_setting_set "$app" instance_id "$instance_id"
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
@ -138,13 +145,6 @@ ynh_add_systemd_config
# Start services
#=================================================
mkdir -p /var/run/mumble-server/
murmurd -ini "$mumble_conf" -supw "$su_passwd"
#=================================================
# Start services
#=================================================
message="
Mumbleserver was updated!
@ -178,6 +178,13 @@ chown mumble-server /var/run/mumble-server/
usermod --append --groups ssl-cert mumble-server
#=================================================
# Set SuperUser password
#=================================================
mkdir -p /var/run/mumble-server/
murmurd -ini "$mumble_conf" -supw "$su_passwd" "$instance_id"
#=================================================
# Disable default server installed by Debian's package
#=================================================