mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
Merge branch 'testing' into ics
This commit is contained in:
commit
ad32894723
17 changed files with 146 additions and 100 deletions
11
README.md
11
README.md
|
@ -15,7 +15,16 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
## Overview
|
||||
|
||||
Kanban project management software
|
||||
Kanboard is a free and open source Kanban project management software.
|
||||
|
||||
### Features
|
||||
|
||||
- Visualize your work
|
||||
- Limit your work in progress to focus on your goal
|
||||
- Drag and drop tasks to manage your project
|
||||
- Self-hosted
|
||||
- Super simple installation
|
||||
|
||||
|
||||
**Shipped version:** 1.2.22~ynh1
|
||||
|
||||
|
|
|
@ -15,7 +15,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
## Vue d'ensemble
|
||||
|
||||
Logiciel de gestion de projet Kanban
|
||||
Kanboard est un logiciel de gestion de projet Kanban gratuit et open source.
|
||||
|
||||
### Fonctionnalités
|
||||
|
||||
- Visualisez votre travail
|
||||
- Limitez votre travail en cours pour vous concentrer sur votre objectif
|
||||
- Glisser et déposez des tâches pour gérer votre projet
|
||||
- Auto-hébergé
|
||||
|
||||
**Version incluse :** 1.2.22~ynh1
|
||||
|
||||
|
|
|
@ -12,11 +12,12 @@
|
|||
setup_private=1
|
||||
setup_public=1
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=c20bdd69644de72736cdc4438a36faab9ab24c72
|
||||
#1.2.21~ynh3
|
||||
upgrade=1 from_commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
change_url=1
|
||||
;;; Upgrade options
|
||||
; commit=c20bdd69644de72736cdc4438a36faab9ab24c72
|
||||
name=Merge pull request #114 from YunoHost-Apps/testing
|
||||
; commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a
|
||||
name=Merge pull request #133 from YunoHost-Apps/testing
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=Yes&
|
||||
|
|
|
@ -1,24 +1,32 @@
|
|||
<?php
|
||||
|
||||
/*******************************************************************/
|
||||
/* Rename this file to config.php if you want to change the values */
|
||||
/* */
|
||||
/* Make sure all paths are absolute by using __DIR__ where needed */
|
||||
/*******************************************************************/
|
||||
|
||||
// Data folder (must be writeable by the web server user and absolute)
|
||||
define('DATA_DIR', __DIR__.DIRECTORY_SEPARATOR.'data');
|
||||
|
||||
// Enable/Disable debug
|
||||
define('DEBUG', false);
|
||||
|
||||
// Available log drivers: syslog, stderr, stdout or file
|
||||
define('LOG_DRIVER', '');
|
||||
// Available log drivers: syslog, stderr, stdout, system or file
|
||||
define('LOG_DRIVER', 'system');
|
||||
|
||||
// Log filename if the log driver is "file"
|
||||
define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');
|
||||
|
||||
// Plugins directory
|
||||
define('PLUGINS_DIR', 'plugins');
|
||||
define('PLUGINS_DIR', __DIR__.DIRECTORY_SEPARATOR.'plugins');
|
||||
|
||||
// Plugins directory URL
|
||||
define('PLUGIN_API_URL', 'https://kanboard.net/plugins.json');
|
||||
define('PLUGIN_API_URL', 'https://kanboard.org/plugins.json');
|
||||
|
||||
// Enable/Disable plugin installer
|
||||
// Enable/Disable plugin installer (Disabled by default for security reasons)
|
||||
// There is no code review or any approval process to submit a plugin.
|
||||
// This is up to the Kanboard instance owner to validate if a plugin is legit.
|
||||
define('PLUGIN_INSTALLER', true);
|
||||
|
||||
// Available cache drivers are "file" and "memory"
|
||||
|
@ -33,7 +41,7 @@ define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files');
|
|||
// Enable/disable email configuration from the user interface
|
||||
define('MAIL_CONFIGURATION', true);
|
||||
|
||||
// E-mail address for the "From" header (notifications)
|
||||
// E-mail address used for the "From" header (notifications)
|
||||
define('MAIL_FROM', '__EMAIL__');
|
||||
|
||||
// E-mail address used for the "Bcc" header to send a copy of all notifications
|
||||
|
@ -43,7 +51,7 @@ define('MAIL_BCC', '');
|
|||
define('MAIL_TRANSPORT', 'mail');
|
||||
|
||||
// SMTP configuration to use when the "smtp" transport is chosen
|
||||
define('MAIL_SMTP_HOSTNAME', '');
|
||||
define('MAIL_SMTP_HOSTNAME', 'localhost');
|
||||
define('MAIL_SMTP_PORT', 25);
|
||||
define('MAIL_SMTP_USERNAME', '');
|
||||
define('MAIL_SMTP_PASSWORD', '');
|
||||
|
@ -61,7 +69,7 @@ define('DB_RUN_MIGRATIONS', false);
|
|||
define('DB_DRIVER', 'mysql');
|
||||
|
||||
// Mysql/Postgres username
|
||||
define('DB_USERNAME', '__DB_NAME__');
|
||||
define('DB_USERNAME', '__DB_USER__');
|
||||
|
||||
// Mysql/Postgres password
|
||||
define('DB_PASSWORD', '__DB_PWD__');
|
||||
|
@ -84,14 +92,17 @@ define('DB_SSL_CERT', null);
|
|||
// Mysql SSL CA
|
||||
define('DB_SSL_CA', null);
|
||||
|
||||
// Mysql SSL server verification, set to false if you don't want the Mysql driver to validate the certificate CN
|
||||
define('DB_VERIFY_SERVER_CERT', null);
|
||||
|
||||
// Timeout value for PDO attribute
|
||||
define('DB_TIMEOUT', null);
|
||||
|
||||
// Enable LDAP authentication (false by default)
|
||||
define('LDAP_AUTH', false);
|
||||
|
||||
// LDAP server hostname
|
||||
define('LDAP_SERVER', 'localhost');
|
||||
|
||||
// LDAP server port (389 by default)
|
||||
define('LDAP_PORT', 389);
|
||||
// LDAP server protocol, hostname and port URL (ldap[s]://hostname:port)
|
||||
define('LDAP_SERVER', 'ldap://127.0.0.1:389');
|
||||
|
||||
// By default, require certificate to be verified for ldaps:// style URL. Set to false to skip the verification
|
||||
define('LDAP_SSL_VERIFY', true);
|
||||
|
@ -146,9 +157,13 @@ define('LDAP_USER_ATTRIBUTE_PHOTO', '');
|
|||
// Put an empty string to disable language sync
|
||||
define('LDAP_USER_ATTRIBUTE_LANGUAGE', '');
|
||||
|
||||
// Allow automatic LDAP user creation
|
||||
// Automatically create a user profile when a user authenticates via LDAP.
|
||||
// If set to false, only LDAP users can log in for whom a Kanboard profile already exists.
|
||||
define('LDAP_USER_CREATION', true);
|
||||
|
||||
// Set new user as Manager
|
||||
define('LDAP_USER_DEFAULT_ROLE_MANAGER', false);
|
||||
|
||||
// LDAP DN for administrators
|
||||
// Example: CN=Kanboard-Admins,CN=Users,DC=kanboard,DC=local
|
||||
define('LDAP_GROUP_ADMIN_DN', '');
|
||||
|
@ -173,9 +188,16 @@ define('LDAP_GROUP_FILTER', '');
|
|||
// Example for OpenLDAP: (&(objectClass=posixGroup)(memberUid=%s))
|
||||
define('LDAP_GROUP_USER_FILTER', '');
|
||||
|
||||
// LDAP attribute for the user in the group filter
|
||||
// 'username' or 'dn'
|
||||
define('LDAP_GROUP_USER_ATTRIBUTE', 'username');
|
||||
|
||||
// LDAP attribute for the group name
|
||||
define('LDAP_GROUP_ATTRIBUTE_NAME', 'cn');
|
||||
|
||||
// Enable/Disable groups synchronization when external authentication is used.
|
||||
define('LDAP_GROUP_SYNC', true);
|
||||
|
||||
// Enable/disable the reverse proxy authentication
|
||||
define('REVERSE_PROXY_AUTH', true);
|
||||
|
||||
|
@ -185,6 +207,9 @@ define('REVERSE_PROXY_USER_HEADER', 'REMOTE_USER');
|
|||
// Username of the admin, by default blank
|
||||
define('REVERSE_PROXY_DEFAULT_ADMIN', '__ADMIN__');
|
||||
|
||||
// Header name to use for the username
|
||||
define('REVERSE_PROXY_EMAIL_HEADER', 'REMOTE_EMAIL');
|
||||
|
||||
// Default domain to use for setting the email address
|
||||
define('REVERSE_PROXY_DEFAULT_DOMAIN', '__DOMAIN__');
|
||||
|
||||
|
@ -204,7 +229,7 @@ define('MARKDOWN_ESCAPE_HTML', true);
|
|||
define('API_AUTHENTICATION_HEADER', '');
|
||||
|
||||
// Enable/disable url rewrite
|
||||
define('ENABLE_URL_REWRITE', false);
|
||||
define('ENABLE_URL_REWRITE', true);
|
||||
|
||||
// Hide login form, useful if all your users use Google/Github/ReverseProxy authentication
|
||||
define('HIDE_LOGIN_FORM', true);
|
||||
|
@ -225,6 +250,9 @@ define('BRUTEFORCE_LOCKDOWN_DURATION', 15);
|
|||
// See http://php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime
|
||||
define('SESSION_DURATION', 0);
|
||||
|
||||
// Session handler: db or php
|
||||
define('SESSION_HANDLER', 'db');
|
||||
|
||||
// HTTP client proxy
|
||||
define('HTTP_PROXY_HOSTNAME', '');
|
||||
define('HTTP_PROXY_PORT', '3128');
|
||||
|
|
2
conf/cron
Normal file
2
conf/cron
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Execute the daily cronjob at 8am
|
||||
0 8 * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/cli cronjob > /dev/null
|
|
@ -1,2 +0,0 @@
|
|||
# Execute the daily cronjob at 8am
|
||||
0 8 * * * __APP__ cd "__FINALPATH__" && PHP__PHPVERSION__ ./cli cronjob >/dev/null 2>&1
|
|
@ -6,7 +6,7 @@ location __PATH__/ {
|
|||
|
||||
index index.php;
|
||||
client_max_body_size 50M;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
try_files $uri $uri/ __PATH__/index.php;
|
||||
|
||||
# Override CSP header to make SSOWAT user panel compatible with kanboard
|
||||
more_set_headers "Content-Security-Policy: default-src 'self' 'unsafe-eval' data:; style-src 'self' 'unsafe-inline'";
|
||||
|
|
9
doc/DESCRIPTION.md
Normal file
9
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
Kanboard is a free and open source Kanban project management software.
|
||||
|
||||
### Features
|
||||
|
||||
- Visualize your work
|
||||
- Limit your work in progress to focus on your goal
|
||||
- Drag and drop tasks to manage your project
|
||||
- Self-hosted
|
||||
- Super simple installation
|
8
doc/DESCRIPTION_fr.md
Normal file
8
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
Kanboard est un logiciel de gestion de projet Kanban gratuit et open source.
|
||||
|
||||
### Fonctionnalités
|
||||
|
||||
- Visualisez votre travail
|
||||
- Limitez votre travail en cours pour vous concentrer sur votre objectif
|
||||
- Glisser et déposez des tâches pour gérer votre projet
|
||||
- Auto-hébergé
|
|
@ -34,7 +34,7 @@
|
|||
"multi_instance": true,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php7.4-fpm",
|
||||
"php8.0-fpm",
|
||||
"mysql"
|
||||
],
|
||||
"arguments": {
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.4"
|
||||
YNH_PHP_VERSION="8.0"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql"
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -74,4 +74,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Backup script completed for Kanboard. (YunoHost will then actually copy those files to the archive)."
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -127,4 +127,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Change of URL completed for Kanboard" --last
|
||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||
|
|
|
@ -13,6 +13,11 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
### Remove this function if there's nothing to clean before calling the remove script.
|
||||
true
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
|
@ -21,8 +26,8 @@ ynh_abort_if_errors
|
|||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
|
||||
|
@ -31,7 +36,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
# Check destination directory
|
||||
final_path=/var/www/$app
|
||||
|
@ -43,10 +48,10 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..."
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=adminusername --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
|
@ -92,14 +97,6 @@ chmod -R 700 $final_path/sessions
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -109,12 +106,20 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=16
|
|||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
# CREATE CONFIG.PHP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring Kanboard..."
|
||||
ynh_script_progression --message="Configuring the app..."
|
||||
|
||||
dir="__DIR__"
|
||||
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
|
||||
|
@ -127,7 +132,7 @@ chown $app "$final_path/config.php"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Initializing database..." --weight=7
|
||||
|
||||
ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" < "${final_path}/app/Schema/Sql/mysql.sql"
|
||||
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/app/Schema/Sql/mysql.sql"
|
||||
|
||||
pushd $final_path
|
||||
# Launch database migration
|
||||
|
@ -146,23 +151,23 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app"
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=2
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=2
|
||||
|
||||
# Make app public or private
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php"
|
||||
else
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php"
|
||||
fi
|
||||
|
@ -183,4 +188,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of Kanboard completed" --last
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
|
|
|
@ -42,7 +42,7 @@ ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Kanboard main directory..."
|
||||
ynh_script_progression --message="Removing the app main directory..."
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
@ -100,4 +100,4 @@ ynh_system_user_delete --username=$app
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Removal of Kanboard completed" --last
|
||||
ynh_script_progression --message="Removal of $app completed" --last
|
||||
|
|
|
@ -34,16 +34,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -55,7 +50,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring Kanboard main directory..." --weight=5
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=5
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
|
@ -67,13 +62,16 @@ chown -R $app $final_path/{data,plugins,sessions}
|
|||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5
|
||||
|
||||
# Restore the file first, so it can have a backup if different
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -109,6 +107,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Restoring the cron file..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
@ -125,4 +124,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoration completed for Kanboard" --last
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
|
|
|
@ -18,14 +18,10 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=adminusername)
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -36,7 +32,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Kanboard before upgrading (may take a while)..." --weight=5
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -95,7 +91,7 @@ then
|
|||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php"
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data $final_path/config.php"
|
||||
fi
|
||||
|
||||
mkdir -p $final_path/sessions/
|
||||
|
@ -106,13 +102,6 @@ chmod -R 700 $final_path/sessions
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
|
@ -129,10 +118,18 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE KANBOARD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading Kanboard..." --weight=2
|
||||
ynh_script_progression --message="Upgrading the app..." --weight=2
|
||||
|
||||
pushd $final_path
|
||||
# Launch database migration
|
||||
|
@ -151,29 +148,12 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex
|
|||
#=================================================
|
||||
# SETUP CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..."
|
||||
|
||||
ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app"
|
||||
ynh_script_progression --message="Setuping a cron..." --weight=2
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
chown root: "/etc/cron.d/$app"
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2
|
||||
|
||||
# Make app public or private
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php"
|
||||
ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php"
|
||||
else
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
@ -185,4 +165,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of Kanboard completed" --last
|
||||
ynh_script_progression --message="Installation of $app completed" --last
|
||||
|
|
Loading…
Reference in a new issue