From 815fdff717341e71d2029b00b1f3c74b1ac7d3ab Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 10 Jul 2020 19:52:43 +0530 Subject: [PATCH] Hard-code path for now --- bin/update/README.md | 2 +- bin/update/start.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/update/README.md b/bin/update/README.md index 2568f6d..1241c44 100644 --- a/bin/update/README.md +++ b/bin/update/README.md @@ -36,7 +36,7 @@ How over-the-air updates work on Umbrel. 11. `umbrel-dashboard` then alerts the user regarding the new update, and after the user consents, it makes a `POST` request to `umbrel-manager` to start the update process. -14. `umbrel-manager` creates a signal file on the mounted host OS volume (`$HOME/statuses/start-updated`) with content `vX.Y.Z`, and returns `200 OK` to the `umbrel-dashboard`. +14. `umbrel-manager` creates a signal file on the mounted host OS volume (`$HOME/statuses/start-updated`) with the version `X.Y.Z`, and returns `200 OK` to the `umbrel-dashboard`. 15. [`fswatch`](https://github.com/emcrisostomo/fswatch), a file monitoring tool that's continuosly monitoring the `$HOME/statuses/start-update` file notices the change, and immeditaly runs [`$HOME/bin/update/start.sh`](https://github.com/mayankchhabra/umbrel/blob/ota-updates/bin/update/start.sh) as root. diff --git a/bin/update/start.sh b/bin/update/start.sh index 3b71cc9..8d2f128 100755 --- a/bin/update/start.sh +++ b/bin/update/start.sh @@ -1,6 +1,7 @@ #!/bin/bash -e -UMBREL_PATH=$(dirname $(readlink -f $0)) +# UMBREL_PATH=$(dirname $(readlink -f $0)) +UMBREL_PATH=/home/umbrel RELEASE="v$(cat $UMBREL_PATH/statuses/start-update)" UMBREL_USER=umbrel