mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
Merge branch 'add-cron' into upgrade-v.1.2.16
This commit is contained in:
commit
b85b46634c
9 changed files with 50 additions and 4 deletions
|
@ -244,4 +244,4 @@ define('SHOW_GROUP_MEMBERSHIPS_IN_USERLIST', true);
|
||||||
// Limit number of groups to display in userlist (The full list of group-memberships is always shown, ...
|
// Limit number of groups to display in userlist (The full list of group-memberships is always shown, ...
|
||||||
// ... when hovering the mouse over the group-icon of a given user!)
|
// ... when hovering the mouse over the group-icon of a given user!)
|
||||||
// If set to 0 ALL group-memberships will be listed (7 by default)
|
// If set to 0 ALL group-memberships will be listed (7 by default)
|
||||||
define('SHOW_GROUP_MEMBERSHIPS_IN_USERLIST_WITH_LIMIT', 7);
|
define('SHOW_GROUP_MEMBERSHIPS_IN_USERLIST_WITH_LIMIT', 7);
|
||||||
|
|
2
conf/cron_kanboard
Normal file
2
conf/cron_kanboard
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Execute the daily cronjob at 8am
|
||||||
|
0 8 * * * __APP__ cd "__FINALPATH__" && PHP__PHPVERSION__ ./cli cronjob >/dev/null 2>&1
|
|
@ -16,6 +16,11 @@ location __PATH__/ {
|
||||||
# Override CSP header to make SSOWAT user panel compatible with kanboard
|
# Override CSP header to make SSOWAT user panel compatible with kanboard
|
||||||
more_set_headers Content-Security-Policy "default-src 'self' 'unsafe-eval' data:;";
|
more_set_headers Content-Security-Policy "default-src 'self' 'unsafe-eval' data:;";
|
||||||
|
|
||||||
|
# Deny access to the directory data
|
||||||
|
location __PATH__/data {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
},
|
},
|
||||||
"version": "1.2.16~ynh1",
|
"version": "1.2.16~ynh1",
|
||||||
"url": "https://kanboard.net/",
|
"url": "https://kanboard.net/",
|
||||||
"license": "AGPL-3.0",
|
"license": "MIT",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "YunoHost Contributors",
|
"name": "YunoHost Contributors",
|
||||||
"email": "apps@yunohost.org"
|
"email": "apps@yunohost.org"
|
||||||
|
|
|
@ -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/jail.d/$app.conf"
|
||||||
ynh_backup --src_path="/etc/fail2ban/filter.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
|
# BACKUP THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -49,8 +49,6 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#================================================
|
#================================================
|
||||||
|
@ -146,6 +144,16 @@ 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
|
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_kanboard /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="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -71,6 +71,14 @@ ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=7
|
||||||
|
|
||||||
ynh_remove_fail2ban_config
|
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
|
# 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_restore_file "/etc/fail2ban/filter.d/$app.conf"
|
||||||
ynh_systemd_action --action=restart --service_name=fail2ban
|
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
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -171,6 +171,16 @@ 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
|
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_kanboard /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="__PHPVERSION__" --replace_string="$phpversion" --target_file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue