1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_mypads_ynh.git synced 2024-09-03 18:36:09 +02:00

Cleaning up

This commit is contained in:
ericgaspar 2021-07-04 19:41:02 +02:00
parent 868c596a7f
commit 1e446f57b9
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 13 additions and 13 deletions

View file

@ -42,7 +42,7 @@ useldap=$YNH_APP_ARG_USELDAP
app=$YNH_APP_INSTANCE_NAME 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..." ynh_script_progression --message="Validating installation parameters..."
@ -54,7 +54,7 @@ fi
ynh_print_ON ynh_print_ON
final_path=/var/www/$app 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 # Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url 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 ynh_script_progression --message="Finding an available port..." --weight=2
# Find a free port # Find an available port
port=$(ynh_find_port --port=9001) port=$(ynh_find_port --port=9001)
ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=port --value=$port

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -25,13 +25,13 @@ export=$(ynh_app_setting_get --app=$app --key=export)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
#================================================= #=================================================
# REMOVE SERVICE FROM ADMIN PANEL # REMOVE SERVICE INTEGRATION IN YUNOHOST
#================================================= #=================================================
# Remove a service from the admin panel, added by `yunohost service add` # Remove the service from the list of services known, YunoHost (added from `yunohost service add`)
if ynh_exec_fully_quiet yunohost service status $app if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service..." ynh_script_progression --message="Removing $app service integration..."
yunohost service remove $app yunohost service remove $app
fi fi
@ -72,7 +72,7 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
#================================================= #=================================================
# REMOVE APP MAIN DIR # 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 # Remove the app directory securely
ynh_secure_remove --file="$final_path" 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 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 ynh_system_user_delete --username=$app
#================================================= #=================================================

View file

@ -6,7 +6,7 @@
# IMPORT GENERIC HELPERS # 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 ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_clean_setup () { 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 ynh_clean_check_starting
} }
# Exit if an error occurs during the execution of the script # 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 ynh_maintenance_mode_ON
#================================================= #=================================================
# STANDARD RESTORE STEPS # STANDARD RESTORATION STEPS
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================