mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
Added cron job
This commit is contained in:
parent
0ce22efc14
commit
7fbd8cb92b
4 changed files with 23 additions and 0 deletions
2
conf/cron
Normal file
2
conf/cron
Normal file
|
@ -0,0 +1,2 @@
|
|||
MAILTO="admin"
|
||||
5 * * * * __USER__ /usr/bin/php YNH_WWW_PATH/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null
|
|
@ -162,6 +162,13 @@ ynh_add_fpm_config
|
|||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Set up cron
|
||||
ynh_replace_string "YNH_WWW_PATH" "$final_path" ../conf/cron
|
||||
ynh_replace_string "__USER__" "$app" ../conf/cron
|
||||
ynh_replace_string "__DOMAIN__" "$domain" ../conf/cron
|
||||
ynh_replace_string "__PATH__" "$path_url" ../conf/cron
|
||||
sudo cp -f ../conf/cron /etc/cron.d/$app
|
||||
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
|
|
|
@ -76,6 +76,13 @@ ynh_system_user_create $app
|
|||
# Restore permissions on app files
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Set up cron
|
||||
ynh_replace_string "YNH_WWW_PATH" "$final_path" ../conf/cron
|
||||
ynh_replace_string "__USER__" "$app" ../conf/cron
|
||||
ynh_replace_string "__DOMAIN__" "$domain" ../conf/cron
|
||||
ynh_replace_string "__PATH__" "$path_url" ../conf/cron
|
||||
sudo cp -f ../conf/cron /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -118,6 +118,13 @@ ynh_add_fpm_config
|
|||
# Set permissions on app files
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Set up cron
|
||||
ynh_replace_string "YNH_WWW_PATH" "$final_path" ../conf/cron
|
||||
ynh_replace_string "__USER__" "$app" ../conf/cron
|
||||
ynh_replace_string "__DOMAIN__" "$domain" ../conf/cron
|
||||
ynh_replace_string "__PATH__" "$path_url" ../conf/cron
|
||||
sudo cp -f ../conf/cron /etc/cron.d/$app
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue