generated from Start9Labs/hello-world-startos
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* better federation health check * adding admin cert volume * admin cert path update * version bump
- Loading branch information
Showing
4 changed files
with
25 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
FEDERATION=$(yq e '.federation' /data/start9/config.yaml) | ||
|
||
if [ $FEDERATION = 'false' ]; then | ||
if [ "$FEDERATION" = 'false' ]; then | ||
exit 59 | ||
fi | ||
|
||
DURATION=$(</dev/stdin) | ||
if (($DURATION <= 40000 )); then | ||
read DURATION | ||
if [ "$DURATION" -le 10000 ]; then | ||
exit 60 | ||
else | ||
curl -skf https://synapse.embassy/_matrix/federation/v1/version &>/dev/null | ||
CHCK='curl -skf https://synapse.embassy/_matrix/federation/v1/version >/dev/null 2>&1' | ||
eval "$CHCK" | ||
exit_code=$? | ||
if test "$exit_code" != 0; then | ||
echo "Homeserver is unreachable" >&2 | ||
exit 1 | ||
if [ "$exit_code" -ne 0 ]; then | ||
echo "Initializing Homeserver ..." >&2 | ||
exit 61 | ||
sleep 25 | ||
eval "$CHCK" | ||
exit_code=$? | ||
if [ "$exit_code" -ne 0 ]; then | ||
echo "Homeserver is unreachable" >&2 | ||
exit 1 | ||
fi | ||
fi | ||
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
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