This commit is contained in:
2023-04-16 21:38:32 +08:00
parent a0849e40ef
commit 0b6c876a0f
59 changed files with 1026 additions and 189 deletions

View File

@@ -30,10 +30,10 @@ function Quit {
Print killing nginx ...
nginx -s quit || true
while running= ; do
pkill -f php-fpm7 && running=1 && Print killing php-fpm7 ...
pkill -f sleep && running=1 && Print killing sleep ...
pkill -f nginx && running=1 && Print killing nginx ...
[ -z "$running" ] && break
pkill -f php-fpm81 && running=1 && Print killing php-fpm81 ...
pkill -f sleep && running=1 && Print killing sleep ...
pkill -f nginx && running=1 && Print killing nginx ...
[ -z "$running" ] && break
sleep 1
done
Print Container stopped.
@@ -41,8 +41,8 @@ function Quit {
}
function ChangeOwner {
Print Change file owner ...
chown nginx.root /var/log/nginx/
Print Changing file owner ...
chown nginx:root /var/log/nginx/
}
function SideCar {
@@ -61,14 +61,14 @@ function SideCar {
&& [ "$md5" != "$last_md5" ] \
&& last_md5=$md5 \
&& nginx -tq \
&& Print Reload nginx conf ... \
&& Print Reloading nginx conf ... \
&& nginx -s reload
done
}
function StartProc {
Print Start php ...
php-fpm7 -F -y /etc/php7/php-fpm.conf &
php-fpm81 -F -y /etc/php81/php-fpm.conf &
PIDS="$PIDS $!"
Print Start nginx ...
nginx -g "$GLOBAL_DIRECTIVES" &
@@ -76,6 +76,7 @@ function StartProc {
Print Start nginx sidecar ...
SideCar &
PIDS="$PIDS $!"
Print Nginx and php started.
}
function Main {