--- files/fcgiwrap.in.orig 2017-08-13 06:25:26.000000000 -0400 +++ files/fcgiwrap.in 2017-09-03 08:23:54.629709000 -0400 @@ -77,6 +77,11 @@ ;; esac if [ -n "${fcgiwrap_socket_mode}" ]; then + # wait up to 4s for the socket file to be created + for I in $(seq 1 20); do + [ -e ${fcgiwrap_socket#unix:} ] && break + sleep .2 + done chmod ${fcgiwrap_socket_mode} ${fcgiwrap_socket#unix:} fi if [ -n "${fcgiwrap_socket_owner}" ]; then