#!/bin/bash

set -eo pipefail

if ! (echo "long string cause rst" | nc -U /var/run/php-fpm.sock > /dev/null) > /dev/null; then
	echo "PHP-fpm not running"
	exit 1
fi

echo "PHP-fpm is running"
exit 0
