Project

General

Profile

Download (1.75 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
7
# Copyright (c) 2014-2022 Rubicon Communications, LLC (Netgate)
8
# All rights reserved.
9
#
10
# originally based on m0n0wall (http://neon1.net/m0n0wall)
11
# Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
12
# All rights reserved.
13
#
14
# Licensed under the Apache License, Version 2.0 (the "License");
15
# you may not use this file except in compliance with the License.
16
# You may obtain a copy of the License at
17
#
18
# http://www.apache.org/licenses/LICENSE-2.0
19
#
20
# Unless required by applicable law or agreed to in writing, software
21
# distributed under the License is distributed on an "AS IS" BASIS,
22
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
# See the License for the specific language governing permissions and
24
# limitations under the License.
25

    
26
echo ">>> Killing check_reload_status"
27
/bin/pkill -9 check_reload_status
28
sleep 2
29

    
30
echo ">>> Killing php-fpm"
31
/bin/pkill -F /var/run/php-fpm.pid
32
sleep 2
33

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

    
48
# restart check_reload_status
49
echo ">>> Starting check_reload_status"
50
/usr/bin/nice -n20 /usr/local/sbin/check_reload_status
(65-65/85)