diff --git a/scripts/backup b/scripts/backup index 71a7b00..1b563c6 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -28,11 +28,13 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." --weight=2 CHECK_SIZE "$final_path" ynh_backup --src_path="$final_path" @@ -40,14 +42,13 @@ ynh_backup --src_path="$final_path" #================================================= # BACKUP NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Backing up the MySQL database..." --weight=3 +ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql CHECK_SIZE "db.sql" @@ -57,21 +58,18 @@ CHECK_SIZE "db.sql" #================================================= # BACKUP LOGROTATE #================================================= -ynh_script_progression --message="Backing up logrotate configuration..." ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= # BACKUP SYSTEMD #================================================= -ynh_script_progression --message="Backing up systemd configuration..." ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= # BACKUP FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Backing up fail2ban configuration..." ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" @@ -80,4 +78,4 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 2b55063..b3954a7 100644 --- 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=40 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=40 # Backup the current version of the app ynh_backup_before_upgrade @@ -88,7 +88,7 @@ ynh_abort_if_errors #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=3 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -120,7 +120,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --action=reload --service_name=nginx diff --git a/scripts/install b/scripts/install index c46c0bc..57f0ef6 100644 --- a/scripts/install +++ b/scripts/install @@ -126,7 +126,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config @@ -298,7 +298,7 @@ fi #================================================= # SETUP FAIL2BAN #================================================= -ynh_script_progression --message="Configuring fail2ban..." --weight=13 +ynh_script_progression --message="Configuring Fail2ban..." --weight=13 # Create a dedicated fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failregex=" .* .POST /mypads/api/auth/login HTTP/1.1. 400" --max_retry=5 @@ -318,7 +318,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --action=reload --service_name=nginx @@ -348,14 +348,14 @@ admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4) if [ $mypads -eq 1 ] then - Informations="You can access 2 different admin panels, for etherpad by accessing https://$domain${path_url%/}/admin and for mypads by accessing https://$domain${path_url%/}/mypads/?/admin." + Informations="You can access 2 different admin panels, for Etherpad by accessing https://$domain${path_url%/}/admin and for MyPads by accessing https://$domain${path_url%/}/mypads/?/admin." else Informations="You can access the admin panel by accessing https://$domain${path_url%/}/admin." fi ynh_print_OFF echo "$Informations -Or, you can find a config file for etherpad at this path /var/www/etherpad_mypads/settings.json. +You can also find a config file for Etherpad at this path /var/www/etherpad_mypads/settings.json. Your credentials for the admin panel are: - login : $admin diff --git a/scripts/remove b/scripts/remove index 1415a9b..5507df8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -71,7 +71,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." +ynh_script_progression --message="Removing Etherpad main directory..." # Remove the app directory securely ynh_secure_remove --file="/var/www/$app" @@ -79,7 +79,7 @@ ynh_secure_remove --file="/var/www/$app" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=2 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2 # Remove the dedicated nginx config ynh_remove_nginx_config @@ -95,7 +95,7 @@ ynh_remove_logrotate #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Removing fail2ban configuration..." --weight=7 +ynh_script_progression --message="Removing Fail2ban configuration..." --weight=7 # Remove the dedicated fail2ban config ynh_remove_fail2ban_config diff --git a/scripts/restore b/scripts/restore index 619f0e4..1510ced 100644 --- a/scripts/restore +++ b/scripts/restore @@ -154,7 +154,7 @@ systemctl enable $app.service #================================================= # RESTORE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the fail2ban configuration..." --weight=6 +ynh_script_progression --message="Restoring the Fail2ban configuration..." --weight=6 ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" @@ -163,7 +163,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --action=reload --service_name=nginx @@ -188,14 +188,14 @@ ynh_maintenance_mode_OFF if [ $mypads -eq 1 ] then - Informations="You can access 2 different admin panels, for etherpad by accessing https://$domain${path_url%/}/admin and for mypads by accessing https://$domain${path_url%/}/mypads/?/admin." + Informations="You can access 2 different admin panels, for Etherpad by accessing https://$domain${path_url%/}/admin and for MyPads by accessing https://$domain${path_url%/}/mypads/?/admin." else Informations="You can access to the admin panel, by accessing https://$domain${path_url%/}/admin." fi ynh_print_OFF echo "$Informations -Or, you can find a config file for etherpad at this path /var/www/etherpad_mypads/settings.json. +You can also find a config file for Etherpad at this path /var/www/etherpad_mypads/settings.json. Your credentials for the admin panel are: - login : $admin diff --git a/scripts/upgrade b/scripts/upgrade index 4b9666f..2becd12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -194,7 +194,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." # Overwrite the nginx configuration only if it's allowed if [ $overwrite_nginx -eq 1 ] @@ -361,7 +361,7 @@ chown $app -R /var/log/$app/etherpad.log #================================================= # UPGRADE FAIL2BAN #================================================= -ynh_script_progression --message="Reconfiguring fail2ban..." --weight=8 +ynh_script_progression --message="Reconfiguring Fail2ban..." --weight=8 # Create a dedicated fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failregex=" .* .POST /mypads/api/auth/login HTTP/1.1. 400" --max_retry=5 @@ -414,7 +414,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --action=reload --service_name=nginx @@ -454,13 +454,13 @@ ynh_app_changelog --format=$format if [ $mypads -eq 1 ] then - Informations="You can access 2 different admin panels, for etherpad by accessing https://$domain${path_url%/}/admin and for mypads by accessing https://$domain${path_url%/}/mypads/?/admin." + Informations="You can access 2 different admin panels, for Etherpad by accessing https://$domain${path_url%/}/admin and for MyPads by accessing https://$domain${path_url%/}/mypads/?/admin." else Informations="You can access the admin panel by accessing https://$domain${path_url%/}/admin." fi echo "$Informations -Or, you can find a config file for etherpad at this path /var/www/etherpad_mypads/settings.json. +You can also find a config file for Etherpad at this path /var/www/etherpad_mypads/settings.json. You can configure this app easily by using the experimental config-panel feature $admin_panel/config-panel. You can also find some specific actions for this app by using the experimental action feature $admin_panel/actions.