diff --git a/README.md b/README.md index 944d0fd..16f9976 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ This setup is designed to allow multiple versions of PHP running at the same tim - Setup a new PHP log file for the version installed - Configure the PHP-FPM user and listener - Install the PHP-FPM service script -- Update the `/usr/local/bin/startup.sh` script to include the new PHP-FPM service ## Enable new websites diff --git a/setup/installers/install-php.sh b/setup/installers/install-php.sh index 460f709..0f44723 100755 --- a/setup/installers/install-php.sh +++ b/setup/installers/install-php.sh @@ -267,7 +267,6 @@ readonly PHPFPM_ROOT="${PHP_VERSION_ROOT}" readonly PHPFPM_SOCK="var/run/php-fpm.sock" readonly PHPFPM_SERVICE_FILE="${PHPFPM_ROOT}/etc/init.d/php-fpm" readonly PHPFPM_SERVICE_NAME="php-fpm-${PHP_VERSION_INSTALL}" -readonly STARTUP_SCRIPT="/usr/local/bin/startup.sh" # PHP-FPM config location changed in 7.0. # See: https://github.com/php/php-src/blob/php-7.0.0/sapi/fpm/Makefile.frag @@ -297,12 +296,4 @@ log_info "Installing PHP-FPM service script as ${PHPFPM_SERVICE_NAME}." cp "${PHPFPM_SERVICE_FILE}" "/etc/init.d/${PHPFPM_SERVICE_NAME}" -if [ -f "${STARTUP_SCRIPT}" ]; then - log_info "Adding PHP-FPM service ${PHPFPM_SERVICE_NAME} to startup script." - - cat << EOF >> "${STARTUP_SCRIPT}" -service ${PHPFPM_SERVICE_NAME} restart -EOF -fi - log_info "PHP version ${PHP_VERSION_INSTALL} install complete!" diff --git a/setup/resources/wsl/startup.sh b/setup/resources/wsl/startup.sh index 90b8c42..71e469c 100755 --- a/setup/resources/wsl/startup.sh +++ b/setup/resources/wsl/startup.sh @@ -22,3 +22,10 @@ done service redis-server restart service mysql restart service apache2 restart + +# Loop through all the PHP-FPM services and restart them. +for phpfpm in `service --status-all 2>&1 | grep -o php-fpm.*` +do + echo "Restarting service $phpfpm." + service $phpfpm restart +done \ No newline at end of file