[Asterisk-code-review] contrib/systemd: Added note on commen issue with systemd and asterisk (asterisk[18])

Mark Petersen asteriskteam at digium.com
Thu Dec 17 09:48:16 CST 2020


Mark Petersen has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15225 )


Change subject: contrib/systemd: Added note on commen issue with systemd and asterisk
......................................................................

contrib/systemd: Added note on commen issue with systemd and asterisk

With newer version of Centos / Fedora and other linux
/var/run/ is a symlinc to /run/ that has been turned into tmpfs
have also adde not that if asterisk has to bind to a spicifik IP
that systemd have to wait until the network is up
and a how to make sure that the enveroiment variable HOSTNAME is
include

ASTERISK-29216
Reported by: Mark Petersen
Tested by: Mark Petersen

Change-Id: Ib3e560655befd3e99eec743687144f5569533379
---
M contrib/systemd/asterisk.service
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/15225/1

diff --git a/contrib/systemd/asterisk.service b/contrib/systemd/asterisk.service
index c3d4648..fd36247 100644
--- a/contrib/systemd/asterisk.service
+++ b/contrib/systemd/asterisk.service
@@ -1,15 +1,22 @@
 [Unit]
 Description=Asterisk PBX and telephony daemon.
 After=network.target
+#include these if asterisk need to bind to a spicifik IP (other than 0.0.0.0
+#Wants=network-online.target
+#After=network-online.target network.target
 
 [Service]
 Type=notify
 Environment=HOME=/var/lib/asterisk
+#if systemd do not provide hostname and you need to use ${ENV(HOSTNAME)}
+#Environment=HOSTNAME=%H
 WorkingDirectory=/var/lib/asterisk
 User=asterisk
 Group=asterisk
 ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
 ExecReload=/usr/sbin/asterisk -rx 'core reload'
+#if linux rebuild /var/run on restart, this will crerate it on start
+#RuntimeDirectory=asterisk
 
 #Nice=0
 #UMask=0002

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15225
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Ib3e560655befd3e99eec743687144f5569533379
Gerrit-Change-Number: 15225
Gerrit-PatchSet: 1
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201217/dec47623/attachment.html>


More information about the asterisk-code-review mailing list