Created
March 3, 2014 15:03
-
-
Save ntrrgc/9326847 to your computer and use it in GitHub Desktop.
php-fpm systemd unit with auto-restart (because php-fpm crashes half the times it's started)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=PHP FastCGI Server | |
After=syslog.target network.target remote-fs.target nss-lookup.target | |
[Service] | |
Type=forking | |
PIDFile=/run/php-fpm.pid | |
ExecStart=/usr/sbin/php-fpm --fpm-config /etc/php5/fpm/php-fpm.conf | |
ExecReload=/bin/kill -s HUP $MAINPID | |
ExecStop=/bin/kill -s QUIT $MAINPID | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment