1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Fix plugin installation and sessions

This commit is contained in:
Jean-Baptiste Holcroft 2017-10-30 10:59:00 +01:00
parent 9d9bf20403
commit 339a25c936
3 changed files with 14 additions and 9 deletions

View file

@ -69,3 +69,4 @@ php_value[upload_max_filesize] = 10G
php_value[post_max_size] = 10G
php_value[default_charset] = UTF-8
php_value[always_populate_raw_post_data] = -1
php_value[session.save_path] = /var/www/__NAMETOCHANGE__/sessions

View file

@ -83,6 +83,7 @@ ynh_app_setting_set "$app" mysqlpwd "$dbpass"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
mkdir -p "$final_path"/sessions/
#=================================================
# NGINX CONFIGURATION
@ -137,7 +138,8 @@ ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < "${final_path}/app/Schema/S
# Set permissions to kanboard and data directory
chown -R root:root "$final_path"
chown -R "$app" "$final_path"/{data,plugins}
chown -R "$app" "$final_path"/{data,plugins,sessions}
chmod -R 700 "$final_path"/sessions
#=================================================
# SETUP SSOWAT

View file

@ -82,6 +82,7 @@ ynh_abort_if_errors
mv "$final_path" "$final_path.old"
ynh_setup_source "$final_path"
mkdir -p "$final_path"/sessions
# restore data
cp -a "$final_path.old/data" "$final_path"
@ -108,9 +109,6 @@ ynh_add_nginx_config
# Create a system user
ynh_system_user_create "$app"
# flush php sessions before upgrade
/usr/lib/php5/sessionclean
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -138,10 +136,13 @@ ynh_replace_string "yuno_domain" "$domain" "$config_php"
# Database initialization
#=================================================
# Launch database migration
"$final_path"/cli db:migrate
# Launch database migration
"$final_path"/cli plugin:upgrade
(
cd "$final_path"
# Launch database migratio
php cli db:migrate --no-interaction --verbose
# Launch plugins migration
php cli plugin:upgrade --no-interaction --verbose
)
#=================================================
# GENERIC FINALIZATION
@ -151,7 +152,8 @@ ynh_replace_string "yuno_domain" "$domain" "$config_php"
# Set permissions to kanboard and data directory
chown -R root:root "$final_path"
chown -R "$app" "$final_path"/{data,plugins}
chown -R "$app" "$final_path"/{data,plugins,sessions}
chmod -R 700 "$final_path"/sessions
#=================================================
# SETUP SSOWAT