From f16c8744f6f173c202c75f3f0874445a766e783d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 15 Jan 2021 16:34:46 +0100 Subject: [PATCH] Fix --- scripts/backup | 2 +- scripts/change_url | 4 ++-- scripts/install | 8 ++------ scripts/remove | 11 ++++------- scripts/restore | 6 +++--- scripts/upgrade | 10 ++++------ 6 files changed, 16 insertions(+), 25 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6ae700f..c0f1b6d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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)." diff --git a/scripts/change_url b/scripts/change_url index 10d80ee..0dbac85 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -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 diff --git a/scripts/install b/scripts/install index 3ee5bf3..85e6c06 100755 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/remove b/scripts/remove index c1c0bc8..66f2e7e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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 diff --git a/scripts/restore b/scripts/restore index 8903707..d515607 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 5504fd3..21babbb 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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