How to write sh file for app start and app stop

how to write sh file for app start and app stop??

I want to write command “app start …” in sh file
restart.sh (102 Bytes)

this is error i got

./restart.sh: line 4: app: not found

i don’t see problem:


root@swi-mdm9x28-wp:/tmp# echo "app status" > ./test.sh
root@swi-mdm9x28-wp:/tmp# chmod 777 ./test.sh
root@swi-mdm9x28-wp:/tmp# ./test.sh
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp