Skip to content

Instantly share code, notes, and snippets.

@azimut
Created November 10, 2016 16:13
Show Gist options
  • Save azimut/71171452ebf730f70504d318e4873803 to your computer and use it in GitHub Desktop.
Save azimut/71171452ebf730f70504d318e4873803 to your computer and use it in GitHub Desktop.
mod version of the init.d file to fix the start issue
17a18,21
> # Additional environment file
> if [ -f /opt/atomic/atomic-php56/root/etc/sysconfig/php-fpm ]; then
> . /opt/atomic/atomic-php56/root/etc/sysconfig/php-fpm
> fi
25,26c29,30
< pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
< lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
---
> pidfile=${PIDFILE-/opt/atomic/atomic-php56/root/var/run/php-fpm/php-fpm.pid}
> lockfile=${LOCKFILE-/var/lock/subsys/atomic-php56-php-fpm}
32c36
< daemon --pidfile ${pidfile} php-fpm
---
> daemon --pidfile ${pidfile} /opt/atomic/atomic-php56/root/usr/sbin/php-fpm --daemonize
54,55c58,65
< killproc -p ${pidfile} php-fpm -USR2
< RETVAL=$?
---
> if ! /opt/atomic/atomic-php56/root/usr/sbin/php-fpm --test ; then
> RETVAL=6
> echo $"not reloading due to configuration syntax error"
> failure $"not reloading $prog due to configuration syntax error"
> else
> killproc -p ${pidfile} php-fpm -USR2
> RETVAL=$?
> fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment