How to auto start an application in openwrt?

后端 未结 3 2262
渐次进展
渐次进展 2020-12-28 21:49

I have created a shell with necessary functions such as start() stop() restart()

But my file is not getting started at boot time.

I have used

3条回答
  •  猫巷女王i
    2020-12-28 22:37

    If you need to run your command only at system start (just after boot): edit /etc/rc.local that is your file.

    By default it contains just comments (Designated Driver, but this was the case in some earlier versions also):

    # Put your custom commands here that should be executed once
    # the system init finished. By default this file does nothing.
    

    You can add commands here.

    My example:

    # Put your custom commands here that should be executed once
    # the system init finished. By default this file does nothing.
    
    if grep -q '/dev/sdb2' /proc/swaps ; then swapoff /dev/sda2 ; fi
    comgt -s /etc/config/init-script.comgt
    

提交回复
热议问题