mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
Add cronjob
This commit is contained in:
parent
2d99f5cba2
commit
f28041096b
6 changed files with 39 additions and 2 deletions
2
conf/cron_kanboard
Normal file
2
conf/cron_kanboard
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Execute the daily cronjob at 8am
|
||||
0 8 * * * cd "__FINALPATH__" && ./cli cronjob >/dev/null 2>&1
|
|
@ -57,6 +57,12 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP A CRON FILE
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -49,8 +49,6 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
#================================================
|
||||
|
@ -146,6 +144,14 @@ ynh_script_progression --message="Configuring Fail2Ban..." --weight=10
|
|||
|
||||
ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: <HOST>,.*$" --max_retry=5
|
||||
|
||||
#=================================================
|
||||
# SETUP CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..."
|
||||
|
||||
cp ../conf/cron_kandboard /etc/cron.d/$app
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path/" --target_file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -71,6 +71,14 @@ ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=7
|
|||
|
||||
ynh_remove_fail2ban_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE THE CRON FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the cron file..." --weight=2
|
||||
|
||||
# Remove a cron file
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
|
@ -99,6 +99,13 @@ ynh_restore_file "/etc/fail2ban/jail.d/$app.conf"
|
|||
ynh_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the cron file..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -171,6 +171,14 @@ ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=7
|
|||
|
||||
ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: <HOST>,.*$" --max_retry=5
|
||||
|
||||
#=================================================
|
||||
# SETUP CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..."
|
||||
|
||||
cp ../conf/cron_kandboard /etc/cron.d/$app
|
||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path/" --target_file="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue