[OpenSIPS-Users] Check config files before stop opensips service

Mickael Hubert mickael at winlux.fr
Fri Feb 15 13:54:22 EST 2019


Hi,
thanks for your answer

I already tried to this:
`/usr/sbin/opensips -C -f /etc/opensips/opensips.cfg && /usr/bin/pkill
--pidfile %t/opensips/opensips.pid`

But even I have a syntax error before stop, the opensips check exit with
error, but daemon is killed anyway.
Even I havn't ExecStop, daemon is killed... I don't know why :(

I will check in depth ;)

++

Le ven. 15 févr. 2019 à 10:58, Răzvan Crainea <razvan at opensips.org> a
écrit :

> Hi, Mickael!
>
> You can use either -C and -c parameters when starting OpenSIPS to check
> the config syntax. If you want to check it before stopping OpenSIPS,
> you'll have to adjust your opensips.service file to run a different
> ExecStop command, something like `/usr/sbin/opensips -C -f
> /etc/opensips/opensips.cfg && /usr/bin/pkill --pidfile
> %t/opensips/opensips.pid`
>
> Hope this helps!
> Răzvan
>
> On 2/13/19 9:22 PM, Mickael Hubert wrote:
> > I would like to know, if there is a way to check opensips's config files
> > before stop service.
> > Ex: If I do a syntax error into cfg files (with opensips started), I
> > want to "ban" the daemon shutdown (service opensips stop)
> >
> > I'm playing with opensips.service and opensips -C -f $config to try to
> > reach my goal, but I'm not be able to do at this moment...
> >
> > Do you have an idea please ?
> > Thanks in advance
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
> --
> Răzvan Crainea
> OpenSIPS Core Developer
>    http://www.opensips-solutions.com
> Meet the OpenSIPS team at the next OpenSIPS Summit:
>    https://www.opensips.org/events
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190215/ac60c9fc/attachment.html>


More information about the Users mailing list