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:
parent
fee081f72f
commit
81e92bc368
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue