My service in openwrt blocks other services to start. What to do?

I have my service name "enterprise" having service order 90. It starts a python program which runs in continuous loop . When enterprise service gets started then further services having order greater than 90 does not run why? What to do in this case? Is it because of while loop used in python program or some other reason and how to solve this issue?

Sounds like your init script is not procd enabled and not properly daemonizing/backgrounding the process. Best is to paste your init script contents here so we can take a look what is wrong.

#!/bin/sh /etc/rc.common
# Kenstel Enterprise script


START=90

start() {
        python3 /KenstelEnterpriseFirmware/src/main.py
}

stop() {
        echo stop
        # commands to kill application
}

Yeah, so as expected. I assume your python script is not daemonizing so it runs in foreground and the init script never completes.

Try this one instead:

#!/bin/sh /etc/rc.common

USE_PROCD=1
START=90

start_service() {
    procd_open_instance
    procd_set_param command /usr/bin/python3 /KenstelEnterpriseFirmware/src/main.py
    procd_close_instance
}

You are Great! It solved the problem. Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.