-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·43 lines (33 loc) · 1.05 KB
/
Copy pathbootstrap
File metadata and controls
executable file
·43 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set +e
# Create the temporarily directory if neccessary
if [ ! -d /tmp/.journey ]; then
mkdir -p /tmp/.journey
mkdir -p /tmp/.journey/nginx/proxy
mkdir -p /tmp/.journey/nginx/body
mkdir -p /tmp/.journey/nginx/fastcgi
mkdir -p /tmp/.journey/nginx/uwsgi
mkdir -p /tmp/.journey/nginx/scgi
fi
echo "Starting php-fpm..."
php-fpm7.4 -c /code/.fun/root/usr/lib/php/7.4/php.ini-production \
-y /code/.fun/root/etc/php/7.4/fpm/php-fpm.conf
echo "Starting nginx..."
nginx -c /code/.fun/root/etc/nginx/nginx.conf
sleep 5
while true
do
echo "Checking..."
nginx_server=`ps aux | grep nginx | grep -v grep`
if [ ! "$nginx_server" ]; then
echo "Restarting nginx..."
nginx -c /code/.fun/root/etc/nginx/nginx.conf
fi
php_fpm_server=`ps aux | grep php-fpm | grep -v grep`
if [ ! "$php_fpm_server" ]; then
echo "Restarting php-fpm..."
php-fpm7.4 -c /code/.fun/root/usr/lib/php/7.4/php.ini-production \
-y /code/.fun/root/etc/php/7.4/fpm/php-fpm.conf
fi
sleep 10
done