php systemd 更新

This commit is contained in:
midoks 2022-06-21 10:36:05 +08:00
parent c2c231e07f
commit b4b99655b1
2 changed files with 20 additions and 3 deletions

View File

@ -0,0 +1,17 @@
# It's not recommended to modify this file in-place, because it
# will be overwritten during upgrades. If you want to customize,
# the best way is to use the "systemctl edit" command.
[Unit]
Description=The PHP {$VERSION} FastCGI Process Manager
After=network.target
[Service]
Type=forking
ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --daemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=false
[Install]
WantedBy=multi-user.target

View File

@ -8,9 +8,9 @@ After=network.target
[Service]
Type=forking
ExecStart={$SERVER_PATH}/php/{$VERSION}/sbin/php-fpm --daemonize --fpm-config {$SERVER_PATH}/php/{$VERSION}/etc/php-fpm.conf
ExecStop=/bin/kill -INT $MAINPID
ExecReload=/bin/kill -USR2 $MAINPID
ExecStart={$SERVER_PATH}/php/init.d/php{$VERSION} start
ExecStop={$SERVER_PATH}/php/init.d/php{$VERSION} stop
ExecReload={$SERVER_PATH}/php/init.d/php{$VERSION} reload
PrivateTmp=false
[Install]