1
0
Fork 0
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:
anmol 2018-10-31 19:47:56 +05:30
parent 0ce22efc14
commit 7fbd8cb92b
4 changed files with 23 additions and 0 deletions

2
conf/cron Normal file
View file

@ -0,0 +1,2 @@
MAILTO="admin"
5 * * * * __USER__ /usr/bin/php YNH_WWW_PATH/console core:archive --url=https://__DOMAIN__/__PATH__ > /dev/null

View file

@ -162,6 +162,13 @@ ynh_add_fpm_config
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path 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 # SETUP SSOWAT

View file

@ -76,6 +76,13 @@ ynh_system_user_create $app
# Restore permissions on app files # Restore permissions on app files
chown -R $app: $final_path 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 # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================

View file

@ -118,6 +118,13 @@ ynh_add_fpm_config
# Set permissions on app files # Set permissions on app files
chown -R $app: $final_path 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 # SETUP SSOWAT
#================================================= #=================================================