<div dir="ltr"><div>Hi,</div><div>thanks for your answer</div><div><br></div><div>I already tried to this: <br></div><div>`/usr/sbin/opensips -C -f /etc/opensips/opensips.cfg && /usr/bin/pkill --pidfile %t/opensips/opensips.pid`</div><div><br></div><div>But even I have a syntax error before stop, the opensips check exit with error, but daemon is killed anyway.</div><div>Even I havn't ExecStop, daemon is killed... I don't know why :(</div><div><br></div><div>I will check in depth ;)</div><div><br></div><div><a class="gmail_plusreply" id="plusReplyChip-0">++</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 15 févr. 2019 à 10:58, Răzvan Crainea <<a href="mailto:razvan@opensips.org">razvan@opensips.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Mickael!<br>
<br>
You can use either -C and -c parameters when starting OpenSIPS to check <br>
the config syntax. If you want to check it before stopping OpenSIPS, <br>
you'll have to adjust your opensips.service file to run a different <br>
ExecStop command, something like `/usr/sbin/opensips -C -f <br>
/etc/opensips/opensips.cfg && /usr/bin/pkill --pidfile <br>
%t/opensips/opensips.pid`<br>
<br>
Hope this helps!<br>
Răzvan<br>
<br>
On 2/13/19 9:22 PM, Mickael Hubert wrote:<br>
> I would like to know, if there is a way to check opensips's config files <br>
> before stop service.<br>
> Ex: If I do a syntax error into cfg files (with opensips started), I <br>
> want to "ban" the daemon shutdown (service opensips stop)<br>
> <br>
> I'm playing with opensips.service and opensips -C -f $config to try to <br>
> reach my goal, but I'm not be able to do at this moment...<br>
> <br>
> Do you have an idea please ?<br>
> Thanks in advance<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> <br>
<br>
-- <br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.com</a><br>
Meet the OpenSIPS team at the next OpenSIPS Summit:<br>
<a href="https://www.opensips.org/events" rel="noreferrer" target="_blank">https://www.opensips.org/events</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>