1 |
a3cc8dcc
|
Ermal
|
#!/bin/sh
|
2 |
ac24dc24
|
Renato Botelho
|
#
|
3 |
|
|
# rc.php-fpm-restart
|
4 |
|
|
#
|
5 |
|
|
# part of pfSense (https://www.pfsense.org)
|
6 |
38809d47
|
Renato Botelho do Couto
|
# Copyright (c) 2014-2016 Electric Sheep Fencing
|
7 |
8f2f85c3
|
Luiz Otavio O Souza
|
# Copyright (c) 2014-2022 Rubicon Communications, LLC (Netgate)
|
8 |
ac24dc24
|
Renato Botelho
|
# All rights reserved.
|
9 |
|
|
#
|
10 |
|
|
# originally based on m0n0wall (http://neon1.net/m0n0wall)
|
11 |
c5d81585
|
Renato Botelho
|
# Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
12 |
ac24dc24
|
Renato Botelho
|
# All rights reserved.
|
13 |
|
|
#
|
14 |
b12ea3fb
|
Renato Botelho
|
# 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 |
ac24dc24
|
Renato Botelho
|
#
|
18 |
b12ea3fb
|
Renato Botelho
|
# http://www.apache.org/licenses/LICENSE-2.0
|
19 |
ac24dc24
|
Renato Botelho
|
#
|
20 |
b12ea3fb
|
Renato Botelho
|
# 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 |
a3cc8dcc
|
Ermal
|
|
26 |
ad401906
|
lukehamburg
|
echo ">>> Killing check_reload_status"
|
27 |
|
|
/bin/pkill -9 check_reload_status
|
28 |
|
|
sleep 2
|
29 |
|
|
|
30 |
9a25a85d
|
Chris Buechler
|
echo ">>> Killing php-fpm"
|
31 |
e173dd74
|
Phil Davis
|
/bin/pkill -F /var/run/php-fpm.pid
|
32 |
a3cc8dcc
|
Ermal
|
sleep 2
|
33 |
|
|
|
34 |
|
|
# Run the php.ini setup file and populate
|
35 |
3646fbcb
|
Renato Botelho
|
# /usr/local/etc/php.ini
|
36 |
a3cc8dcc
|
Ermal
|
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
|
37 |
e5a67d33
|
jim-p
|
/bin/rm -f /var/run/php-fpm.pid 2>/dev/null
|
38 |
|
|
/bin/rm -f /var/run/php-fpm.socket 2>/dev/null
|
39 |
96a399cb
|
Chris Buechler
|
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 |
a3cc8dcc
|
Ermal
|
echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
|
45 |
9a25a85d
|
Chris Buechler
|
echo ">>> Starting php-fpm"
|
46 |
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
|
47 |
a3cc8dcc
|
Ermal
|
|
48 |
ad401906
|
lukehamburg
|
# restart check_reload_status
|
49 |
|
|
echo ">>> Starting check_reload_status"
|
50 |
|
|
/usr/bin/nice -n20 /usr/local/sbin/check_reload_status
|