Private
Public Access
Retry Hyperion indefinitely with autostart enabled
This commit is contained in:
1 parent
3160cf005b
commit
e720045bb1
13 files changed
+102
-33
No files matched your search
+4
-5
@@ -8,16 +8,15 @@ command -v luna-send >/dev/null 2>&1 || exit 0
|
||||
command -v timeout >/dev/null 2>&1 || exit 0
|
||||
(
|
||||
echo 'HyperDRM boot start requested'
|
||||
attempt=0
|
||||
while [ -x "$TARGET" ] && [ -f "$SERVICE_DIR/services.json" ] && [ -L "$HOOK" ] && [ "$(readlink "$HOOK")" = "$SERVICE_DIR/boot.sh" ] && [ "$attempt" -lt 120 ]; do
|
||||
while [ -x "$TARGET" ] && [ -f "$SERVICE_DIR/services.json" ] && [ -L "$HOOK" ] && [ "$(readlink "$HOOK")" = "$SERVICE_DIR/boot.sh" ]; do
|
||||
result=$(timeout 12 luna-send -n 1 luna://org.webosbrew.histogramhyperion.service/start '{}' 2>&1)
|
||||
case "$result" in
|
||||
*'"running":true'*) echo 'HyperDRM service started'; exit 0 ;;
|
||||
*'"retryScheduled":true'*) echo 'HyperDRM service is retrying startup in the background'; exit 0 ;;
|
||||
*'"retryBlocked":true'*) echo 'HyperDRM startup requires manual intervention'; exit 0 ;;
|
||||
esac
|
||||
attempt=$((attempt + 1))
|
||||
printf 'Attempt %s failed: %.512s\n' "$attempt" "$result"
|
||||
sleep 5
|
||||
done
|
||||
echo 'HyperDRM boot start cancelled, target removed or retry limit reached'
|
||||
echo 'HyperDRM boot start cancelled, target removed'
|
||||
) >/var/lib/webosbrew/histogramhyperion-boot.log 2>&1 </dev/null &
|
||||
exit 0
|
||||
Binary file not shown.
Reference in new issue
Block a user