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_images
2020-01-02 18:43:40 +01:00

41 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# CHECK IF ARGUMENTS ARE CORRECT
#=================================================
#=================================================
# CHECK IF AN ACTION HAS TO BE DONE
#=================================================
#=================================================
# SPECIFIC ACTION
#=================================================
# REMOVE EXPIRED IMAGES
#=================================================
ynh_script_progression --message="Removing expired images..." --weight=9
(cd "$final_path" && exec_as $app $(which carton) exec script/lutim cron cleanfiles)
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Execution completed" --last