saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

Fix pidfile to match PIDFile in systemd service #209

Open scambra opened 4 years ago

scambra commented 4 years ago

I had php fpm installed from packages.sury.org/php repository on Debian 10. When I upgraded to latest version (7.4.2-5 and 5.6.40-20) fpm failed to restart.

PIDFile in systemd service for sury packages have always been: PIDFile=/run/php/phpVERSION-fpm.pid

Starting service worked for previous versions, but latest versions have these lines in systemd services, which make start to fail if pid file is not found: ExecStartPost=-update-alternatives --quiet --install /run/php/php-fpm.sock php-fpm.sock /run/php/phpVERSION-fpm.sock VERSION ExecStopPost=-update-alternatives --quiet --remove php-fpm.sock /run/php/phpVERSION-fpm.sock

scambra commented 4 years ago

commit 393d69eb0fda49f3598d5f9040be5d3bad59b5dd changed one path, but I think it applies only for Ubuntu, not for Debian. And I think fpm/config.sls needs to be changed too when multiple versions are installed.

myii commented 4 years ago

Sorry for the delay, @scambra. Could you have a look at this, @sticky-note?