Project

General

Profile

Download (1.7 KB) Statistics
| Branch: | Tag: | Revision:
1 a3cc8dcc Ermal
#!/bin/sh
2 ac24dc24 Renato Botelho
#
3
# rc.php-fpm-restart
4
#
5
# part of pfSense (https://www.pfsense.org)
6 81299b5c Renato Botelho
# Copyright (c) 2014-2016 Rubicon Communications, LLC (Netgate)
7 ac24dc24 Renato Botelho
# All rights reserved.
8
#
9
# originally based on m0n0wall (http://neon1.net/m0n0wall)
10 c5d81585 Renato Botelho
# Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11 ac24dc24 Renato Botelho
# All rights reserved.
12
#
13 b12ea3fb Renato Botelho
# 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 ac24dc24 Renato Botelho
#
17 b12ea3fb Renato Botelho
# http://www.apache.org/licenses/LICENSE-2.0
18 ac24dc24 Renato Botelho
#
19 b12ea3fb Renato Botelho
# 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 a3cc8dcc Ermal
25 ad401906 lukehamburg
echo ">>> Killing check_reload_status"
26
/bin/pkill -9 check_reload_status
27
sleep 2
28
29 9a25a85d Chris Buechler
echo ">>> Killing php-fpm"
30 e173dd74 Phil Davis
/bin/pkill -F /var/run/php-fpm.pid
31 a3cc8dcc Ermal
sleep 2
32
33
# Run the php.ini setup file and populate
34 3646fbcb Renato Botelho
# /usr/local/etc/php.ini
35 a3cc8dcc Ermal
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
36 e5a67d33 jim-p
/bin/rm -f /var/run/php-fpm.pid 2>/dev/null
37
/bin/rm -f /var/run/php-fpm.socket 2>/dev/null
38 96a399cb Chris Buechler
if [ -f /tmp/xmlrpc.lock ]; then
39
	echo ">>> Found XMLRPC lock. Removing."
40
	echo ">>> Found XMLRPC lock. Removing." | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
41
	rm /tmp/xmlrpc.lock
42
fi
43 a3cc8dcc Ermal
echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
44 9a25a85d Chris Buechler
echo ">>> Starting php-fpm"
45 3646fbcb Renato Botelho
/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
46 a3cc8dcc Ermal
47 ad401906 lukehamburg
# restart check_reload_status
48
echo ">>> Starting check_reload_status"
49
/usr/bin/nice -n20 /usr/local/sbin/check_reload_status