-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated s6overlay to v3 Note: xz-utils was added as a requirement for s6-overlay (using safe 5.4.1 instead of compromised 5.6.x versions)
- Loading branch information
Showing
8 changed files
with
39 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/with-contenv bash | ||
#!/command/with-contenv bash | ||
|
||
if [ -n "${TZ}" ] | ||
then | ||
|
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,13 +1,25 @@ | ||
#!/usr/bin/with-contenv bash | ||
#!/command/with-contenv bash | ||
|
||
echo "waiting for scrutiny service to start" | ||
s6-svwait -u /var/run/s6/services/scrutiny | ||
# ensure not run (successfully) before | ||
if [ -f /tmp/custom-init-performed ]; then | ||
echo 'INFO: custom init already performed' | ||
s6-svc -D /run/service/collector-once # prevent s6 from restarting service | ||
exit 0 | ||
fi | ||
|
||
#tell s6 to only run this script once | ||
s6-svc -O /var/run/s6/services/collector-once | ||
echo "waiting for scrutiny service to start" | ||
s6-svwait -u /run/service/scrutiny | ||
|
||
# wait until scrutiny is "Ready" | ||
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/api/health); do echo "scrutiny api not ready" && sleep 5; done | ||
|
||
echo "starting scrutiny collector (run-once mode. subsequent calls will be triggered via cron service)" | ||
/opt/scrutiny/bin/scrutiny-collector-metrics run | ||
|
||
# prevent script's core logic from running again | ||
touch /tmp/custom-init-performed | ||
|
||
# prevent s6 from restarting service | ||
s6-svc -D /run/service/collector-once | ||
|
||
exit 0 |
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,4 @@ | ||
#!/usr/bin/execlineb -S0 | ||
#!/command/execlineb -S0 | ||
|
||
echo "cron exiting" | ||
s6-svscanctl -t /var/run/s6/services |
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,4 @@ | ||
#!/usr/bin/with-contenv bash | ||
#!/command/with-contenv bash | ||
|
||
echo "starting cron" | ||
cron -f -L 15 |
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,4 @@ | ||
#!/usr/bin/with-contenv bash | ||
#!/command/with-contenv bash | ||
|
||
mkdir -p /opt/scrutiny/influxdb/ | ||
|
||
|
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