2018-09-30 11:52:12 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# GENERIC STARTING
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
source scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
2020-04-24 20:16:33 +02:00
|
|
|
#=================================================
|
|
|
|
# MANAGE SCRIPT FAILURE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
|
|
ynh_abort_if_errors
|
|
|
|
|
2018-09-30 11:52:12 +02:00
|
|
|
#=================================================
|
|
|
|
# RETRIEVE ARGUMENTS
|
|
|
|
#=================================================
|
|
|
|
|
2020-04-24 20:16:33 +02:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2018-09-30 11:52:12 +02:00
|
|
|
|
2020-01-02 18:40:15 +01:00
|
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
2018-09-30 11:52:12 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CHECK IF ARGUMENTS ARE CORRECT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# CHECK IF AN ACTION HAS TO BE DONE
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# SPECIFIC ACTION
|
|
|
|
#=================================================
|
|
|
|
# REMOVE OBSOLETE IP FROM THE DATABASE
|
|
|
|
#=================================================
|
2020-01-02 18:40:15 +01:00
|
|
|
ynh_script_progression --message="Removing obsolete ip from the database..." --weight=9
|
2018-09-30 11:52:12 +02:00
|
|
|
|
2021-05-16 16:48:58 +02:00
|
|
|
(cd "$final_path" && ynh_exec_as $app $(which carton) exec script/lutim cron cleanbdd)
|
2019-01-30 16:19:40 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
ynh_script_progression --message="Execution completed" --last
|