diff --git a/scripts/install b/scripts/install index 47529dd..e9bdb42 100644 --- a/scripts/install +++ b/scripts/install @@ -107,12 +107,21 @@ ynh_add_fpm_config # Add cron job #================================================= +# Path where crontab will be installed cron_path="/etc/cron.d/$app" -ynh_replace_string "__USER__" "$app" ../conf/cheky.cron -ynh_replace_string "__FINALPATH__" "$final_path" ../conf/cheky.cron -sudo cp ../conf/cheky.cron "$cron_path" + +# Copy crontab from package to Yunohost +sudo cp -a ../conf/cheky.cron "$cron_path" + +# Secure crontab +chown root: "$cron_path" sudo chmod 644 "$cron_path" +# Configure crontab +ynh_replace_string "__USER__" "$app" "$cron_path" +ynh_replace_string "__FINALPATH__" "$final_path" "$cron_path" + + #================================================= # SETUP APPLICATION WITH CURL #=================================================