Skip to content

Commit

Permalink
Defer Node-RED start after reboot for 30 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Oct 16, 2019
1 parent 45804b6 commit 0712b33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions addon_files/redmatic/bin/redmatic
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ Start () {
logger -t redmatic -p daemon.error "cant start - already running"
exit 1
else
upSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')"
if [ "${upSeconds}" -lt "120" ]; then
logger -t redmatic -p daemon.info "Starting Node-RED after reboot ... waiting 30 seconds..."
echo "Starting Node-RED ... waiting 30 seconds..."
sleep 30
fi
echo -n "Starting Node-RED: "
source $ADDON_DIR/versions
logger -t redmatic -p daemon.info "RedMatic v$VERSION_ADDON (c) Sebastian Raff https://github.com/rdmtc/RedMatic"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redmatic",
"version": "5.0.3",
"version": "5.0.4",
"description": "Node-RED packaged as Homematic CCU addon",
"repository": "github:rdmtc/redmatic",
"private": true,
Expand Down

0 comments on commit 0712b33

Please sign in to comment.