How to change application startup after installation

Hiya,

I have an application installed on a WP device that currently has the startup mode set to manual (i.e. doesn’t automatically start when legato is started).

How do I change the startup mode to automatic - ON THE DEVICE? I don’t want to change the mode in the adef file and rebuild/install - I just need to change the mode on a single platform.

I’ve looked through the cm and app commands … but nothing leaps out at me. I also thought about looking through the system config tree … but a little guidance would be useful before making too many modifications there!

ciao, Dave

how about writing a init script to "app start " your application?

Hi @davidc

This should help I guess :wink:

$ config get system:/apps/smsInboxService/startManual
true

(default if “startManual” is not present is false)

Hi @daav

Bingo. That’s exactly what I was looking for. Thanks.

For the record, to change the startup state (from manual to automatic) for an app from the command line:

$ config set system:/apps/smsInboxService/startManual false bool

and then restart legato or reboot.

Thanks again.

ciao, Dave

Hi @daav,
I set “start: auto” in adef and then set manually start by “config set system:/apps/smsInboxService/startManual true”, then confirmed the value has changed to “ture”
root@swi-mdm9x15:~# config get system:/apps/helloworld/startManual
true
But app still auto run after power up the device, any idea?

If I firstly set “start: manual” in adef and then change it to auto start by “config set system:/apps/smsInboxService/startManual false”, it works.

Mmmm… can you try with:

config set system:/apps/smsInboxService/startManual true bool

I’m afraid that not using the “bool” keyword stores data as a simple string, making the check failing…

Yes @daav, should set type as bool.