1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cheky_ynh.git synced 2024-09-03 18:16:00 +02:00

fix crontab handling : copy + security

This commit is contained in:
Gofannon 2018-05-20 19:38:56 +02:00
parent fee081f72f
commit 81e92bc368

View file

@ -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
#=================================================