On Mon, Dec 19, 2016 at 03:54:47PM +0100, Olivier wrote:
> Hello,
>
> For a new project, I'm adapting existing installation script to CentOS 7.
> I must admit I don't understand how to adapt things to systemd.
>
> Here are my questions:
>
> 1. I don't see any systemd sub-directory in asterisk-13.13.1/contrib.
> Do you think such directory and matching Makefile target could be useful ?
>
> 2. Should /run/asterisk directory creation be left to systemd or done by
> installation script before running "systemctl start asterisk" ?
>
> 3. I edited the following /etc/systemd/system:asterisk.service file:
> [Unit]
> Description=Asterisk PBX and telephony daemon.
> After=network.target
>
> [Service]
> Type=forking
> PIDFile=/var/run/asterisk/asterisk.pid
Remove those two (or get latest version with sd_notify support, make
sure it works, and use 'Type=notify')
> Environment=HOME=/var/lib/asterisk
> WorkingDirectory=/var/lib/asterisk
> ExecStart=/usr/sbin/asterisk -vvvgF -U asterisk -G asterisk -C
Drop -F as well
> /etc/asterisk/asterisk.conf
> #ExecStart=/usr/sbin/asterisk -vvvgF -C /etc/asterisk/asterisk.conf
> ExecStop=/usr/sbin/asterisk -rx 'core stop now'
I'm trying to think if this is needed. Anything wrong with just letting
systemd kill asterisk and all of its child precesses?
> ExecReload=/usr/sbin/asterisk -rx 'core reload'
Also, IIRC:
User=asterisk
--
Tzafrir Cohen
icq#16849755 jabber:[email protected]
+972-50-7952406 mailto:[email protected]
http://www.xorcom.com
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Check out the new Asterisk community forum at: https://community.asterisk.org/
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users