<p dir="ltr"><br>
Am 08.12.2015 22:45 schrieb "Bastian Bittorf" <<a href="mailto:bittorf@bluebottle.com">bittorf@bluebottle.com</a>>:<br>
><br>
> while trying to understand the procd<br>
> respawn-trigger, I wrote this testscript:<br>
><br>
> #!/bin/sh /etc/rc.common<br>
> START=50<br>
> USE_PROCD=1<br>
> PROG=/tmp/test.sh<br>
><br>
> start_service()<br>
> {<br>
>         {<br>
>                 echo '#!/bin/sh'<br>
>                 echo 'logger START-$0 $$'<br>
>                 echo 'sleep 10'<br>
>                 echo 'logger READY-$0 $$'<br>
>         } >$PROG<br>
>         chmod +x $PROG<br>
><br>
>         procd_set_param respawn ${threshold:-20} ${timeout:-5} ${retry:-3}<br>
>         procd_open_instance<br>
>         procd_set_param command "$PROG"<br>
>         procd_close_instance</p>
<p dir="ltr">respawn is an instance attribute, moving that statement inside the open/close instance block should do the job</p>
<p dir="ltr">                 yousong</p>
<p dir="ltr">> }<br>
><br>
> The script starts and ends, i can see it in syslog, but<br>
> it is not automatically restarted. Changing the exitcode<br>
> to != 0 does not change this and kill -9 $$ also does not<br>
> trigger a restart. What i'am doing wrong? when reading<br>
> <a href="https://wiki.openwrt.org/inbox/procd-init-scripts">https://wiki.openwrt.org/inbox/procd-init-scripts</a><br>
> it should work this way.<br>
><br>
> bye, bastian<br>
> _______________________________________________<br>
> openwrt-devel mailing list<br>
> <a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
> <a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</p>