diff --git a/services/service.ts b/services/service.ts index 7c07fd5..7d37c82 100644 --- a/services/service.ts +++ b/services/service.ts @@ -516,6 +516,7 @@ function runService() { 'befe927c6f62b87545aaefb4b2648a227b22695fa0f78a228dcacf1fbba11aeb', 'd914b3b444433bf49ff83c3c0ae0b729cf7544c074e72c23ec24e5f86aaaf4ac', '6215795aed50c11bb7be716cf66326f3657a129143b5edc1b635dab8b8d2fc9f', + 'e04a3d61098c6f74d466da6fb457a52fb61a9cc86869059ae32b13bf43cd9d10', ]; // RootMyTV v2 diff --git a/services/startup.sh b/services/startup.sh index 243f157..17c3b18 100755 --- a/services/startup.sh +++ b/services/startup.sh @@ -25,7 +25,7 @@ touch "${once}" # Use default directory if SERVICE_DIR is not provided. SERVICE_DIR="${SERVICE_DIR-/media/developer/apps/usr/palm/services/org.webosbrew.hbchannel.service}" -if [[ -f /var/luna/preferences/webosbrew_failsafe ]]; then +if [[ -e /var/luna/preferences/webosbrew_failsafe ]]; then # In case a reboot occured during last startup - open an emergency telnet # server and nag user to actually fix this. (since further reboots could # lead to devmode removal, etc...) @@ -35,13 +35,14 @@ if [[ -f /var/luna/preferences/webosbrew_failsafe ]]; then luna-send -a webosbrew -f -n 1 luna://com.webos.notification/createToast '{"sourceId":"webosbrew","message": "Failsafe mode!
A crash has occured during startup. Fix any causes and reboot."}' sleep 15; - rm /var/luna/preferences/webosbrew_failsafe + rm -rf /var/luna/preferences/webosbrew_failsafe + sync -f /var/luna/preferences luna-send -a com.webos.service.secondscreen.gateway -f -n 1 luna://com.webos.notification/createAlert '{"sourceId":"webosbrew","message":"Homebrew Channel - Failsafe mode
A crash has occured during previous startup - root-related system customizations have been temporarily disabled.

System should go back to normal after a reboot.
Would you like to reboot now?","buttons":[{"label":"Reboot now","onclick":"luna://com.webos.service.sleep/shutdown/machineReboot","params":{"reason":"remoteKey"}},{"label":"Reboot later"}]}' else # Set a failsafe flag and sync filesystem to make sure it actually gets # tripped... touch /var/luna/preferences/webosbrew_failsafe - sync + sync -f /var/luna/preferences/webosbrew_failsafe sleep 2 # Close fds to avoid leaking Luna socket @@ -136,5 +137,6 @@ else # Reset failsafe flag after a while sleep 10 - rm /var/luna/preferences/webosbrew_failsafe + rm -rf /var/luna/preferences/webosbrew_failsafe + sync -f /var/luna/preferences fi