diff options
| author | Dmitrii Morozov <snoopdesigns@gmail.com> | 2025-11-26 00:35:42 +0100 |
|---|---|---|
| committer | Dmitrii Morozov <snoopdesigns@gmail.com> | 2025-11-26 00:35:42 +0100 |
| commit | c2bb934a0eff7ccb47699ce20e390c318e0191c2 (patch) | |
| tree | 9df759b0a594647c0219ebe77c04ee44b0f17a5f | |
| parent | c9083542f68faaa6329f71bfaf90ee44d7b1ae39 (diff) | |
| -rwxr-xr-x | systemd/magic4linux-start | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/systemd/magic4linux-start b/systemd/magic4linux-start index 587205b..9ed9597 100755 --- a/systemd/magic4linux-start +++ b/systemd/magic4linux-start @@ -38,7 +38,12 @@ function install_magic4pc() { function check_magic4pc_running() { $ARES_LAUNCH_CMD -r | grep -q 'me.wouterdek.magic4pc' return $? -} +} + +function reset_dev_mode_session() { + $ARES_LAUNCH_CMD com.palmdts.devmode -p '{"extend":true}' + return $? +} function start_magic4pc() { $ARES_LAUNCH_CMD me.wouterdek.magic4pc @@ -62,6 +67,12 @@ if ares_available; then if check_magic4pc_running; then echo "WebOS Magic4pc application is already running" else + echo "Resetting DevMode session.." + if reset_dev_mode_session; then + echo "DevMode session reset successfully" + else + exit 1 + fi echo "WebOS Magic4pc application not running, starting.." if start_magic4pc; then echo "Magic4pc started" |
