diff --git a/doc/ADMIN.md b/doc/ADMIN.md index cbd7a82..ef43357 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,6 +2,8 @@ `sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +or use `sudo yunohost app shell __APP__` then run `php occ ...` + ### Configure ONLYOFFICE integration #### With Nextcloud App (no ARM support, lower performance) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index a449e52..c617ce3 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,6 +2,8 @@ `sudo -u __APP__ php__YNH_PHP_VERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...` +ou utilisez `sudo yunohost app shell __APP__` puis `php occ ...` + ### Configurer l'intégration d'ONLYOFFICE #### Avec l'application Nextcloud (pas de support ARM, performances limitées) diff --git a/scripts/install b/scripts/install index 85e1ca4..a6f0336 100755 --- a/scripts/install +++ b/scripts/install @@ -18,6 +18,7 @@ maintenance_mode=0 fpm_footprint="high" fpm_free_footprint=0 fpm_usage="medium" +phpflags="--define apc.enable_cli=1" #================================================= # STORE SETTINGS FROM MANIFEST @@ -27,6 +28,7 @@ ynh_app_setting_set --app=$app --key=maintenance_mode --value=$maintenance_mode ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 30639a7..accab23 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,12 +41,16 @@ if [ -z "${fpm_free_footprint:-}" ]; then ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi -# If fpm_usage doesn't exist, create it if [ -z "${fpm_usage:-}" ]; then fpm_usage=medium ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi +if [ -z "${phpflags:-}" ]; then + phpflags="--define apc.enable_cli=1" + ynh_app_setting_set --app=$app --key=phpflags --value=$phpflags +fi + # Delete existing ini configuration file (backward compatibility) if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini