[asterisk-dev] JIRA 25988: Systemd unit file for Asterisk: Submission

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon May 16 09:56:34 CDT 2016


On Wed, May 11, 2016 at 12:51:45PM +0000, Sean Brady wrote:
> Hello all, first time committer here. I have a systemd unit file that I’d
> like to pitch in and could use some advice. Where in the project should
> this file to be placed for make install to do it’s magic? What needs to
> happen to the make install script for this file to be included in the make
> install process? From a community point of view, what are the next steps?

Thanks for your bug report. It had reminded me that I had a long pending
patch (originally in the ReviewBoard) for just that. I updated it a bit
and it is now on Gerrit:

  https://gerrit.asterisk.org/2844

> 
> IMHO I don’t think that anything needs to be deprecated in the current make
> install script immediately, as it works as is on Debian Jessie 8 and Centos
> 7 without issue (more testing sorely needed). Eventually I think that we’ll
> need to deprecate all the init.d scripts for distros that are using
> systemd, however until distros start phasing out the init.d process it’s
> probably unnecessary.

contrib/init.d/rc.mandriva.zaptel should already be removed. I didn't
look at the rest of them.

> 
> I’d also like input on exactly how you’d like the systemctl commands to
> function in relation to Asterisk. At the moment, “asterisk -rx ‘core
> reload’” is the action for “systemctl reload asterisk.service” and
> “asterisk -rx ‘core stop now’” for “systemctl stop asterisk.service”. My
> only thoughts/caveats on that is that it may be better to stop convenient
> for the community release. Thoughts?

When I want to reboot the system, it should happen now. I can't wait for
a call to end (which may be stalled for whatever reason).

Also note from systemd.service(5): Systemd will run the ExecStop command
and after it returns will kill all the processes remaining in the
control group. Hence merely running 'core stop <later>' is useless, as
systemd will kill it now. In fact, without a wrapper, such an ExecStop
command is probably useless with asterisk.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com



More information about the asterisk-dev mailing list