summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsystemd/magic4linux-start13
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"