Project

General

Profile

Download (1.53 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2
#
3
# rc.php-fpm-restart
4
#
5
# part of pfSense (https://www.pfsense.org)
6
# Copyright (c) 2014-2016 Electric Sheep Fencing, LLC
7
# All rights reserved.
8
#
9
# originally based on m0n0wall (http://neon1.net/m0n0wall)
10
# Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
# All rights reserved.
12
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
14
# you may not use this file except in compliance with the License.
15
# You may obtain a copy of the License at
16
#
17
# http://www.apache.org/licenses/LICENSE-2.0
18
#
19
# Unless required by applicable law or agreed to in writing, software
20
# distributed under the License is distributed on an "AS IS" BASIS,
21
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
# See the License for the specific language governing permissions and
23
# limitations under the License.
24

    
25
echo ">>> Killing php-fpm"
26
/bin/pkill -F /var/run/php-fpm.pid
27
sleep 2
28

    
29
# Run the php.ini setup file and populate
30
# /usr/local/etc/php.ini
31
/etc/rc.conf_mount_rw
32
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
33
/bin/rm -f /var/run/php-fpm.pid 2>/dev/null
34
/bin/rm -f /var/run/php-fpm.socket 2>/dev/null
35
if [ -f /tmp/xmlrpc.lock ]; then
36
	echo ">>> Found XMLRPC lock. Removing."
37
	echo ">>> Found XMLRPC lock. Removing." | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
38
	rm /tmp/xmlrpc.lock
39
fi
40
/etc/rc.conf_mount_ro
41
echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
42
echo ">>> Starting php-fpm"
43
/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
44

    
(61-61/78)