Skip to content

Commit

Permalink
Fix: Move server log and PID files to .build/server/
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 17, 2024
1 parent 02931b9 commit 2392e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ backend/mirror.gif
backend/mirror.png
backend/mirror.jpg
backend/GeoIP.dat
tests/server.log
tests/server.pid
6 changes: 4 additions & 2 deletions tests/server
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2392e38

Please sign in to comment.