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.
* Bump version * Check if user exists before creating * Better health checks * Cleaning * Update readme * manifest update * fix typo
- Loading branch information
Showing
7 changed files
with
67 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
FEDERATION=$(yq e '.federation' /data/start9/config.yaml) | ||
|
||
if [ "$FEDERATION" = 'false' ]; then | ||
CHCK='curl -skf https://synapse.embassy/_matrix/client/versions >/dev/null 2>&1' | ||
eval "$CHCK" | ||
exit_code=$? | ||
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 | ||
else | ||
while true; do | ||
if [ ! -f /data/start9/stats.yaml ]; then | ||
echo "Waiting for Synapse to finish initialization ..." >&2 | ||
exit 61 | ||
else | ||
chkstats=$(yq e '.data["Admin Username"].value' /data/start9/stats.yaml) | ||
if [ "$chkstats" = "admin" ]; then | ||
exit 0 | ||
else | ||
echo "Failed to retrieve admin credentials." >&2 | ||
exit 1 | ||
fi | ||
fi | ||
done | ||
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