diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 0daffb3..43e3747 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -390,3 +390,6 @@ catch_workers_output = yes ;php_admin_value[error_log] = /var/log/fpm-php.www.log ;php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 32M + +php_admin_value[open_basedir] = none +php_admin_value[date.timezone] = "__YHTZ__" diff --git a/conf/systemd.service b/conf/systemd.service index 1802eb4..14df864 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -4,7 +4,7 @@ After=nginx.service network.target local-fs.target postgresql.service [Service] Type=simple -User=www-data +User=__APP__ WorkingDirectory=__FINALPATH__ ExecStart=/usr/bin/php daemon.php start --url=https://__DOMAIN____PATH__ --port=__PORT__ StandardOutput=syslog diff --git a/scripts/_common.sh b/scripts/_common.sh index ee07fd7..bb63ba5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,7 +16,12 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-curl php #================================================= # PERSONAL HELPERS #================================================= - +undo_sso_patch() { + ( + cd $final_path + patch -p1 -R < $YNH_CWD/../sources/patches/app-00-sso-logout.patch + ) +} #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 6991103..4e70d3c 100644 --- a/scripts/install +++ b/scripts/install @@ -122,7 +122,8 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated php-fpm config -#ynh_replace_string --match_string="YHTZ" --replace_string="$timezone" --target_file=../conf/php-fpm.conf +ynh_replace_string --match_string="__YHTZ__" --replace_string="$timezone" --target_file=../conf/php-fpm.conf + ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) @@ -151,7 +152,7 @@ ynh_store_file_checksum --file="$final_path/config/db.inc.php" cd "$final_path" export COMPOSER_HOME=$final_path curl -sS https://getcomposer.org/installer | php -- --install-dir="$final_path" \ - && php composer.phar install --no-interaction --quiet + && php"${phpversion}" composer.phar install --no-interaction --quiet ) #================================================= @@ -237,9 +238,9 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1 # SSOwat configuration -if [[ "$ssoenabled" = "No" ]]; then +if [[ "$ssoenabled" -eq 0 ]]; then ynh_app_setting_set "$app" skipped_uris "/" - (cd "$final_path" && php"${phpversion}" mud.php config --xmppwhitelist="$domain") + #(cd "$final_path" && php"${phpversion}" mud.php config --xmppwhitelist="$domain") undo_sso_patch else ynh_app_setting_set "$app" unprotected_uris "/"