[Asterisk-code-review] contrib: Add a systemd service (asterisk[master])
George Joseph
asteriskteam at digium.com
Tue May 17 08:52:33 CDT 2016
George Joseph has posted comments on this change.
Change subject: contrib: Add a systemd service
......................................................................
Patch Set 2: Code-Review-1
(3 comments)
https://gerrit.asterisk.org/#/c/2844/2/Makefile
File Makefile:
Line 828: $(INSTALL) -d $(DESTDIR)/lib/systemd/system; \
Blindly creating lib/systemd/system isn't a good idea. If it doesn't exist then the system doesn't support systemd and the service file shouldn't be copied.
If you do copy it, you should run 'systemctl daemon-reload' and 'systemctl enable asterisk' to keep the behavior the same as the rc style init script installs.
https://gerrit.asterisk.org/#/c/2844/2/contrib/asterisk.service
File contrib/asterisk.service:
Line 8: ExecStart=__ASTERISK_SBIN_DIR__/asterisk -g -f -U asterisk
Although the default is 'simple', I'd add a Type here for clarity.
Line 10: Restart=on-failure
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
KillMode=process
TimeoutStopSec=3
will at least give Asterisk a chance to close files and database connections cleanly.
--
To view, visit https://gerrit.asterisk.org/2844
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifde5d054ea0ba23d833e28ba80a6105d80070bc6
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list