mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
setup cron
This commit is contained in:
parent
57c4c35f1d
commit
4f1e347d60
2 changed files with 21 additions and 10 deletions
|
@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
|
@ -91,6 +92,19 @@ then
|
||||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP A CRON
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Setuping a cron..."
|
||||||
|
|
||||||
|
cp ../conf/matomo.cron /etc/cron.d/$app
|
||||||
|
|
||||||
|
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="/etc/cron.d/$app"
|
||||||
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/cron.d/$app"
|
||||||
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="/etc/cron.d/$app"
|
||||||
|
ynh_replace_string --match_string="__PATH__" --replace_string="$new_path" --target_file="/etc/cron.d/$app"
|
||||||
|
ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -151,18 +151,15 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP A CRON
|
# SETUP A CRON
|
||||||
#=================================================
|
#=================================================
|
||||||
# ynh_script_progression --message="Setuping a cron..."
|
ynh_script_progression --message="Setuping a cron..."
|
||||||
|
|
||||||
# cron_path="/etc/cron.d/$app"
|
cp ../conf/matomo.cron /etc/cron.d/$app
|
||||||
# cp -a ../conf/matomo.cron "$cron_path"
|
|
||||||
# chown root: "$cron_path"
|
|
||||||
# chmod 644 "$cron_path"
|
|
||||||
|
|
||||||
# ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$cron_path"
|
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="/etc/cron.d/$app"
|
||||||
# ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$cron_path"
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/cron.d/$app"
|
||||||
# ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$cron_path"
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="/etc/cron.d/$app"
|
||||||
# ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$cron_path"
|
ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="/etc/cron.d/$app"
|
||||||
# ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="$cron_path"
|
ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
Loading…
Reference in a new issue