-
-
Notifications
You must be signed in to change notification settings - Fork 9
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 #26 from sdr-enthusiasts/fixes
Quiet logs, s6-wrap and fix mariadb internal startup
- Loading branch information
Showing
11 changed files
with
138 additions
and
153 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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php 2>&1 | awk '{print "[daemon-acars] " $0}' | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php |
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 |
---|---|---|
@@ -1,4 +1,29 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php 2>&1 | awk '{print "[daemon-spotter] " $0}' | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
if chk_enabled $QUIET_FAM; then | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php 2>&1 | \ | ||
stdbuf -oL awk '! /\\o\//' | \ | ||
stdbuf -oL awk '! /DATA : /' | \ | ||
stdbuf -oL awk '! /New flight.../' | \ | ||
stdbuf -oL awk '! /New aircraft hex/' | \ | ||
stdbuf -oL awk '! /in archive DB/' | \ | ||
stdbuf -oL awk '! /already in DB/' | \ | ||
stdbuf -oL awk '! /Getting schedule info/' | \ | ||
stdbuf -oL awk '! /old values and update latest data/' | \ | ||
stdbuf -oL awk '! /Check if aircraft is already in DB/' | \ | ||
stdbuf -oL awk '! /get arrival\/departure airport/' | \ | ||
stdbuf -oL awk '! /Deleting Live Spotter/' | \ | ||
stdbuf -oL awk '! /Calculated Speed/' | \ | ||
stdbuf -oL awk '! /Calculated Altitude/' | \ | ||
stdbuf -oL awk '! /Calculated Heading/' | \ | ||
stdbuf -oL awk '{print $0}' | ||
else | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php | ||
fi |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
|
||
# if using local database | ||
if [ -z "${MYSQLHOSTNAME}" ]; then | ||
/usr/sbin/mysqld --console --log-error='' 2>&1 | awk '{print "[mariadb] " $0}' | ||
"${s6wrap[@]}" /usr/sbin/mysqld --console --log-error='' --user=root | ||
else | ||
sleep 3600 | ||
"${s6wrap[@]}" sleep 3600 | ||
fi |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
/usr/sbin/nginx 2>&1 | awk '{print "[nginx] " $0}' | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
"${s6wrap[@]}" /usr/sbin/nginx -g 'daemon off;' |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
/usr/sbin/php-fpm7.4 --nodaemonize 2>&1 | awk '{print "[php-fpm] " $0}' | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
"${s6wrap[@]}" /usr/sbin/php-fpm7.4 --nodaemonize |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
|
||
if [ -z "${BASESTATIONHOST}" ]; then | ||
sleep 3600 | ||
"${s6wrap[@]}" sleep 3600 | ||
else | ||
# shellcheck disable=SC2153 | ||
socat -d -d TCP-LISTEN:30003,fork TCP:"${BASESTATIONHOST}":"${BASESTATIONPORT}" | ||
"${s6wrap[@]}" socat -d -d TCP-LISTEN:30003,fork TCP:"${BASESTATIONHOST}":"${BASESTATIONPORT}" | ||
fi |
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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/command/with-contenv sh | ||
# shellcheck shell=sh | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
sleep 1h | ||
s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/update_db.php 2>&1 | awk '{print "[update_db] " $0}' | ||
# shellcheck disable=SC1091,SC2086,SC2016 | ||
source /scripts/common | ||
|
||
s6wrap=(s6wrap --quiet --prepend="$(basename "$0")" --timestamps --args) | ||
"${s6wrap[@]}" sleep 1h | ||
"${s6wrap[@]}" s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/update_db.php |