-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from sdr-enthusiasts/dev
Fix for logging issues
- Loading branch information
Showing
19 changed files
with
95 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
exec /etc/s6-overlay/scripts/nginx-log-to-console | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/command/with-contenv bash | ||
#shellcheck shell=bash disable=SC2154,SC1091 | ||
|
||
source /scripts/common | ||
|
||
if ! chk_enabled "${VERBOSELOG}"; then | ||
"${s6wrap[@]}" echo "Logging to console is disabled. Set \"VERBOSELOG=on\" if you want to see the nginx access and error logs" | ||
sleep infinity | ||
fi | ||
|
||
# tail the log files to console: | ||
|
||
{ "${s6wrap[@]}" tail -F /var/log/nginx/access.log; } & | ||
accesspid="$!" | ||
|
||
{ "${s6wrap[@]}" tail -F /var/log/nginx/error.log; } & | ||
errorpid="$!" | ||
|
||
# Wait until any of them exits for any reason | ||
wait -n | ||
|
||
# kill both processes before exiting, so the restart of the service is done cleanly | ||
kill $accesspid >/dev/null 2>&1 || true | ||
kill $errorpid >/dev/null 2>&1 || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters