1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Fix: Move server log and PID files to .build/server/ (#956)

This commit is contained in:
Andreas Möller
2024-02-17 20:28:53 +01:00
committed by GitHub
parent 2a48b0c7a0
commit 9b25de49f9
2 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@@ -5,5 +5,3 @@ backend/mirror.gif
backend/mirror.png
backend/mirror.jpg
backend/GeoIP.dat
tests/server.log
tests/server.pid

View File

@@ -74,8 +74,8 @@ if [[ $# > 1 ]]; then
fi
# pidfile contents would be hostname:port:pid
PIDFILE=tests/server.pid
LOGFILE=tests/server.log
PIDFILE=.build/server/server.pid
LOGFILE=.build/server/server.log
validate_server () {
which php &> /dev/null
@@ -108,7 +108,9 @@ start_server () {
return 1
else
printf "${GREEN}"$NAME" started on $HOST:$PORT${NORMAL}\n"
mkdir -p $(dirname "$LOGFILE")
php -S "$HOST":"$PORT" -c tests/php.ini >> "$LOGFILE" 2>&1 &
mkdir -p $(dirname "$PIDFILE")
echo "$HOST":"$PORT":$! > $PIDFILE
return 0
fi