1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
This commit is contained in:
ericgaspar 2021-01-15 16:34:46 +01:00
parent 2e91ae1ada
commit f16c8744f6
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 16 additions and 25 deletions

View file

@ -81,4 +81,4 @@ ynh_backup --src_path="/etc/systemd/system/coturn-$app.service"
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info --message="Backup script completed for Galène. (YunoHost will then actually copy those files to the archive)."

View file

@ -33,7 +33,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
ynh_script_progression --message="Backing up Galène before changing its URL (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
@ -121,4 +121,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last
ynh_script_progression --message="Change of URL completed for Galène" --last

View file

@ -159,7 +159,7 @@ ynh_add_systemd_config --service=coturn-$app --template=coturn-galene.service
#=================================================
# SET COTURN CONFIG
#=================================================
ynh_script_progression --message="Configuring coturn..." --weight=1
ynh_script_progression --message="Configuring Coturn..." --weight=1
# WARNING: theses command are used in INSTALL, UPGRADE
# For any update do it in all files
@ -173,7 +173,6 @@ ynh_print_ON
coturn_config_path="/etc/$app/coturn.conf"
cp ../conf/coturn/turnserver.conf "$coturn_config_path"
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$coturn_config_path"
ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$coturn_config_path"
ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$coturn_config_path"
@ -205,17 +204,14 @@ ynh_store_file_checksum --file="$coturn_config_path"
#=================================================
cp ../conf/passwd $final_path/data/passwd
ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd"
ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd"
cp ../conf/groupname.json $final_path/groups/$group_name.json
ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/groups/$group_name.json"
ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/groups/$group_name.json"
cp ../conf/ice-servers.json $final_path/data/ice-servers.json
ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json"
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json"
ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json"
@ -328,4 +324,4 @@ ynh_send_readme_to_admin --app_message="mail_to_send" --type="install"
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression --message="Installation of Galène completed" --last

View file

@ -27,7 +27,7 @@ turnserver_alt_tls_port=$(ynh_app_setting_get --app=$app --key=turnserver_alt_tl
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
ynh_script_progression --message="Removing $app service integration..." --weight=1
ynh_script_progression --message="Removing Galène service integration..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -60,7 +60,7 @@ ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing app main directory..." --weight=2
ynh_script_progression --message="Removing Galène main directory..." --weight=2
# Remove the app directory securely
ynh_secure_remove --file=$final_path
@ -89,7 +89,7 @@ ynh_remove_logrotate
closeport() {
local port=$1
if yunohost firewall list | grep -q "\- $$turnserver_tls_port$"
if yunohost firewall list | grep -q "\- $turnserver_tls_port$"
then
ynh_script_progression --message="Closing port $turnserver_tls_port port"
ynh_exec_warn_less yunohost firewall disallow Both $turnserver_tls_port
@ -100,9 +100,6 @@ closeport() {
fi
}
#closeport $turnserver_tls_port
#closeport $turnserver_alt_tls_port
#=================================================
# GENERIC FINALIZATION
#=================================================
@ -117,4 +114,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression --message="Removal of Galène completed" --last

View file

@ -63,7 +63,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_script_progression --message="Restoring Galène main directory..." --weight=1
ynh_restore_file --origin_path="$final_path"
ynh_restore_file --origin_path="/etc/$app"
@ -125,7 +125,7 @@ fi
#=================================================
# RECONFIGURE THE TURNSERVER
#=================================================
ynh_script_progression --message="Reconfiguring coturn..." --weight=23
ynh_script_progression --message="Reconfiguring Coturn..." --weight=23
# To be sure that at the restoration the IP address in coturn config is the same as the real address we remake the coturn config
@ -226,4 +226,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression --message="Restoration completed for Galène" --last

View file

@ -50,7 +50,7 @@ fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
ynh_script_progression --message="Backing up Galène before upgrading (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
@ -109,7 +109,7 @@ fi
if [ ! -e /etc/$app/coturn.conf ]
then
ynh_script_progression --message="Creating an independant service for coturn..." --weight=1
ynh_script_progression --message="Creating an independant service for Coturn..." --weight=1
#=================================================
# CREATE AN INDEPENDANT SERVICE FOR COTURN
@ -159,7 +159,7 @@ fi
#=================================================
# UPDATE COTURN CONFIG
#=================================================
ynh_script_progression --message="Updating coturn config..." --weight=1
ynh_script_progression --message="Updating Coturn config..." --weight=1
# WARNING : theses command are used in INSTALL, UPGRADE
# For any update do it in all files
@ -209,12 +209,10 @@ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$
#=================================================
cp ../conf/passwd $final_path/data/passwd
ynh_replace_string --match_string=__ADMIN__ --replace_string=$admin --target_file="$final_path/data/passwd"
ynh_replace_string --match_string=__PASSWORD__ --replace_string=$password --target_file="$final_path/data/passwd"
cp ../conf/ice-servers.json $final_path/data/ice-servers.json
ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="$final_path/data/ice-servers.json"
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/data/ice-servers.json"
ynh_replace_string --match_string=__TLS_PORT__ --replace_string=$turnserver_tls_port --target_file="$final_path/data/ice-servers.json"
@ -306,4 +304,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression --message="Upgrade of Galène completed" --last