diff --git a/scripts/install b/scripts/install index 5d7f014..0d9f3f8 100644 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,7 @@ useldap=$YNH_APP_ARG_USELDAP app=$YNH_APP_INSTANCE_NAME #================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THIS ARGS +# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= ynh_script_progression --message="Validating installation parameters..." @@ -54,7 +54,7 @@ fi ynh_print_ON final_path=/var/www/$app -test ! -e "$final_path" || ynh_die "This path already contains a folder" +test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -84,7 +84,7 @@ ynh_app_setting_set --app=$app --key=overwrite_systemd --value="1" #================================================= ynh_script_progression --message="Finding an available port..." --weight=2 -# Find a free port +# Find an available port port=$(ynh_find_port --port=9001) ynh_app_setting_set --app=$app --key=port --value=$port diff --git a/scripts/remove b/scripts/remove index 3f62dad..7fb3266 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# GENERIC STARTING +# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -25,13 +25,13 @@ export=$(ynh_app_setting_get --app=$app --key=export) #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL +# REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove a service from the admin panel, added by `yunohost service add` -if ynh_exec_fully_quiet yunohost service status $app +# Remove the service from the list of services known, YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." + ynh_script_progression --message="Removing $app service integration..." yunohost service remove $app fi @@ -72,7 +72,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing Etherpad main directory..." +ynh_script_progression --message="Removing the app main directory..." # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -110,7 +110,7 @@ ynh_remove_fail2ban_config #================================================= ynh_script_progression --message="Removing the dedicated system user..." --weight=2 -# Delete dedicated system user +# Delete a system user ynh_system_user_delete --username=$app #================================================= diff --git a/scripts/restore b/scripts/restore index 5d09b62..e7ee13c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -# Load common variables for all scripts. +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { -# Clean installation remainings that are not handled by the remove script. + # Clean installation remainings that are not handled by the remove script. ynh_clean_check_starting } # Exit if an error occurs during the execution of the script @@ -55,7 +55,7 @@ ynh_script_progression --message="Activating maintenance mode..." --weight=2 ynh_maintenance_mode_ON #================================================= -# STANDARD RESTORE STEPS +# STANDARD RESTORATION STEPS #================================================= # RESTORE THE NGINX CONFIGURATION #=================================================