summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.php-fpm_restart
blob: a9a9ee1ab5825005bc0c9081e6db9692dd3615c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

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

# Run the php.ini setup file and populate
# /usr/local/etc/php.ini
/etc/rc.conf_mount_rw
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
/bin/rm -f /var/run/php-fpm.pid 2>/dev/null
/bin/rm -f /var/run/php-fpm.socket 2>/dev/null
/etc/rc.conf_mount_ro
echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
echo ">>> Starting php-fpm"
/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null

OpenPOWER on IntegriCloud