1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lutim_ynh.git synced 2024-09-03 19:36:24 +02:00
lutim_ynh/scripts/actions/clean_ip

43 lines
1.4 KiB
Text
Raw Normal View History

2018-09-30 11:52:12 +02:00
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
2019-01-30 16:19:40 +01:00
ynh_script_progression --message="Retrieve arguments from the manifest"
2018-09-30 11:52:12 +02:00
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# CHECK IF ARGUMENTS ARE CORRECT
#=================================================
#=================================================
# CHECK IF AN ACTION HAS TO BE DONE
#=================================================
#=================================================
# SPECIFIC ACTION
#=================================================
# REMOVE OBSOLETE IP FROM THE DATABASE
#=================================================
2019-01-30 16:19:40 +01:00
ynh_script_progression --message="Remove obsolete ip from the database" --weight=9
2018-09-30 11:52:12 +02:00
(cd "$final_path" && $(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