-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move flask process to init
- Loading branch information
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
wmbusmeters-ha-addon-edge/rootfs/etc/services.d/flask/finish
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,12 @@ | ||
#!/usr/bin/env bashio | ||
# ============================================================================== | ||
# Take down the S6 supervision tree when service fails | ||
# s6-overlay docs: https://github.com/just-containers/s6-overlay | ||
# ============================================================================== | ||
|
||
if [[ "$1" -ne 0 ]] && [[ "$1" -ne 256 ]]; then | ||
bashio::log.warning "Halt add-on" | ||
exec /run/s6/basedir/bin/halt | ||
fi | ||
|
||
bashio::log.info "Service restart after closing" |
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,7 @@ | ||
#!/usr/bin/with-contenv bashio | ||
# ============================================================================== | ||
# Start flask web configuration service | ||
# ============================================================================== | ||
|
||
bashio::log.info "Starting web configuration service." | ||
python3 /flask/app.py & |
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