summaryrefslogtreecommitdiff
path: root/entrypoint.sh
blob: 5bdcedebad41e0351a6de332f58a023c4ace02d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -e

echo "Starting fcgiwrap..."
su -l www-data -s /bin/bash -c "/usr/sbin/fcgiwrap -s unix:/run/sock/fcgiwrap.socket" &

echo "Waiting for fcgiwrap socket to appear..."
while [ ! -S /run/sock/fcgiwrap.socket ]; do
    sleep 0.1
done
echo "fcgiwrap socket found."

echo "Starting Nginx..."
exec nginx -g 'daemon off;'