while trying to understand the procd
respawn-trigger, I wrote this testscript:

#!/bin/sh /etc/rc.common
START=50
USE_PROCD=1
PROG=/tmp/test.sh

start_service()
{
        {
                echo '#!/bin/sh'
                echo 'logger START-$0 $$'
                echo 'sleep 10'
                echo 'logger READY-$0 $$'
        } >$PROG
        chmod +x $PROG

        procd_set_param respawn ${threshold:-20} ${timeout:-5} ${retry:-3}
        procd_open_instance
        procd_set_param command "$PROG"
        procd_close_instance
}

The script starts and ends, i can see it in syslog, but
it is not automatically restarted. Changing the exitcode
to != 0 does not change this and kill -9 $$ also does not
trigger a restart. What i'am doing wrong? when reading
https://wiki.openwrt.org/inbox/procd-init-scripts
it should work this way.

bye, bastian
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to