Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run nginx when at least 1 server is defined #184

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rootfs/etc/nginx.tar1090/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
user www-data;
worker_processes auto;
worker_processes 1;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
daemon off;
Expand Down
3 changes: 2 additions & 1 deletion rootfs/etc/s6-overlay/scripts/nginx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

source /scripts/common

if chk_enabled "${TAR1090_DISABLE}"; then
if [[ "$(find /etc/nginx/sites-enabled/ -type f | wc -l)" == "0" ]]; then
exec sleep infinity
fi


mkdir -p /var/log/nginx

exec s6wrap --quiet --prepend=nginx --timestamps --args /usr/sbin/nginx
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/startup.d/02-tar1090-update
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

source /scripts/common

if ! chk_enabled "${UPDATE_TAR1090}"; then
if ! chk_enabled "${UPDATE_TAR1090}" || chk_enabled "${TAR1090_DISABLE}"; then
exit 0
fi

Expand Down
7 changes: 7 additions & 0 deletions rootfs/etc/s6-overlay/startup.d/04-tar1090-configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

source /scripts/common


if chk_enabled "${TAR1090_DISABLE}"; then
rm -f /etc/nginx/sites-enabled/tar1090
exit 0
fi


# create symlink so /var/cache/fontconfig is in tmpfs
# as per Wiedehopf - https://discord.com/channels/734090820684349521/1102603003376177172/1203826726023729162
# shellcheck disable=SC2174
Expand Down
4 changes: 4 additions & 0 deletions rootfs/etc/s6-overlay/startup.d/06-range-outline
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

source /scripts/common

if chk_enabled "${TAR1090_DISABLE}"; then
exit 0
fi

# https://github.com/wiedehopf/tar1090#heywhatsthatcom-range-outline

if [ -n "${HEYWHATSTHAT_PANORAMA_ID}" ]; then
Expand Down
8 changes: 0 additions & 8 deletions rootfs/etc/s6-overlay/startup.d/08-graphs1090-down

This file was deleted.