From a32248a7cac2ea234ec6b4ce2cd4b74686302753 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 12 May 2021 19:25:57 +0200 Subject: [PATCH] Check if a cron job is present and remove it --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/remove b/scripts/remove index 1035d54..8845489 100755 --- a/scripts/remove +++ b/scripts/remove @@ -82,6 +82,16 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight= # Remove the app-specific logrotate config ynh_remove_logrotate +#================================================= +# REMOVE THE CRON FILE +#================================================= +ynh_script_progression --message="Removing the cron file..." --weight=1 + +if [[ ! -f "/etc/cron.d/coturn_config_rotate" ]]; then + # If a cron job as been add by user, remove it + ynh_secure_remove --file="/etc/cron.d/coturn_config_rotate" +fi + #================================================= # CLOSE A PORT #=================================================