mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
commit
7d2bbdb276
10 changed files with 58 additions and 42 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Kanban project management software
|
||||
|
||||
**Shipped version:** 1.2.20~ynh4
|
||||
**Shipped version:** 1.2.21~ynh1
|
||||
|
||||
**Demo:** https://demo.yunohost.org/kanboard/
|
||||
|
||||
|
@ -44,7 +44,6 @@ This is due to a Kanboard limitation.
|
|||
## Documentation and resources
|
||||
|
||||
* Official app website: https://kanboard.net
|
||||
* Official user documentation: https://yunohost.org/#/app_kanboard
|
||||
* Official admin documentation: https://docs.kanboard.org/en/latest/
|
||||
* Upstream app code repository: https://github.com/kanboard/kanboard
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_kanboard
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
Logiciel de gestion de projet Kanban
|
||||
|
||||
**Version incluse :** 1.2.20~ynh4
|
||||
**Version incluse :** 1.2.21~ynh1
|
||||
|
||||
**Démo :** https://demo.yunohost.org/kanboard/
|
||||
|
||||
|
@ -40,7 +40,6 @@ Cela est dû à une limitation de Kanboard.
|
|||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : https://kanboard.net
|
||||
* Documentation officielle utilisateur : https://yunohost.org/#/app_kanboard
|
||||
* Documentation officielle de l'admin : https://docs.kanboard.org/en/latest/
|
||||
* Dépôt de code officiel de l'app : https://github.com/kanboard/kanboard
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_kanboard
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.20.tar.gz
|
||||
SOURCE_SUM=e94c8b75b34a1346f2a5ef7faf8c2300fb05b37a850723d9b92b1d4f0f7d9665
|
||||
SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.21.tar.gz
|
||||
SOURCE_SUM=95b542d63f7cafcc79d76493d184e4f65110fb6294816fa1550a4b34ae65da0b
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
|
|
|
@ -4,17 +4,12 @@ location __PATH__/ {
|
|||
# Path to source
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
client_max_body_size 50M;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
|
||||
# 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:;";
|
||||
|
||||
location __PATH__/(?:kanboard|config.php|config.default.php) {
|
||||
deny all;
|
||||
|
|
|
@ -6,14 +6,13 @@
|
|||
"en": "Kanban project management software",
|
||||
"fr": "Logiciel de gestion de projet Kanban"
|
||||
},
|
||||
"version": "1.2.20~ynh4",
|
||||
"version": "1.2.21~ynh1",
|
||||
"url": "https://kanboard.net",
|
||||
"upstream": {
|
||||
"license": "MIT",
|
||||
"website": "https://kanboard.net",
|
||||
"demo": "https://demo.yunohost.org/kanboard/",
|
||||
"admindoc": "https://docs.kanboard.org/en/latest/",
|
||||
"userdoc": "https://yunohost.org/#/app_kanboard",
|
||||
"code": "https://github.com/kanboard/kanboard"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
@ -22,7 +21,7 @@
|
|||
"email": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.4"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"previous_maintainers": [{
|
||||
"name": "mbugeia",
|
||||
|
@ -42,8 +41,7 @@
|
|||
"install": [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "domain.org"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
@ -53,8 +51,7 @@
|
|||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
"type": "user"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
extra_php_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}-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"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -47,6 +47,13 @@ ynh_script_progression --message="Storing installation settings..."
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=adminusername --value=$admin
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=3
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -97,7 +104,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=16
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -62,6 +62,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
|||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -33,10 +33,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
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
|
||||
|
@ -75,7 +72,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6
|
|||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -97,6 +94,14 @@ 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
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=3
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE CRON FILE
|
||||
#=================================================
|
||||
|
|
|
@ -32,6 +32,20 @@ email=$(ynh_user_get_info --username=$admin --key=mail)
|
|||
|
||||
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
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -56,20 +70,6 @@ if ynh_legacy_permissions_exists; then
|
|||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Kanboard before upgrading (may take a while)..." --weight=5
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -108,13 +108,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=3
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE KANBOARD
|
||||
|
|
Loading…
Reference in a new issue