<p>Mark Petersen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15225">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">contrib/systemd: Added note on commen issue with systemd and asterisk<br><br>With newer version of Centos / Fedora and other linux<br>/var/run/ is a symlinc to /run/ that has been turned into tmpfs<br>have also adde not that if asterisk has to bind to a spicifik IP<br>that systemd have to wait until the network is up<br>and a how to make sure that the enveroiment variable HOSTNAME is<br>include<br><br>ASTERISK-29216<br>Reported by: Mark Petersen<br>Tested by: Mark Petersen<br><br>Change-Id: Ib3e560655befd3e99eec743687144f5569533379<br>---<br>M contrib/systemd/asterisk.service<br>1 file changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/15225/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/systemd/asterisk.service b/contrib/systemd/asterisk.service</span><br><span>index c3d4648..fd36247 100644</span><br><span>--- a/contrib/systemd/asterisk.service</span><br><span>+++ b/contrib/systemd/asterisk.service</span><br><span>@@ -1,15 +1,22 @@</span><br><span> [Unit]</span><br><span> Description=Asterisk PBX and telephony daemon.</span><br><span> After=network.target</span><br><span style="color: hsl(120, 100%, 40%);">+#include these if asterisk need to bind to a spicifik IP (other than 0.0.0.0</span><br><span style="color: hsl(120, 100%, 40%);">+#Wants=network-online.target</span><br><span style="color: hsl(120, 100%, 40%);">+#After=network-online.target network.target</span><br><span> </span><br><span> [Service]</span><br><span> Type=notify</span><br><span> Environment=HOME=/var/lib/asterisk</span><br><span style="color: hsl(120, 100%, 40%);">+#if systemd do not provide hostname and you need to use ${ENV(HOSTNAME)}</span><br><span style="color: hsl(120, 100%, 40%);">+#Environment=HOSTNAME=%H</span><br><span> WorkingDirectory=/var/lib/asterisk</span><br><span> User=asterisk</span><br><span> Group=asterisk</span><br><span> ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf</span><br><span> ExecReload=/usr/sbin/asterisk -rx 'core reload'</span><br><span style="color: hsl(120, 100%, 40%);">+#if linux rebuild /var/run on restart, this will crerate it on start</span><br><span style="color: hsl(120, 100%, 40%);">+#RuntimeDirectory=asterisk</span><br><span> </span><br><span> #Nice=0</span><br><span> #UMask=0002</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15225">change 15225</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15225"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ib3e560655befd3e99eec743687144f5569533379 </div>
<div style="display:none"> Gerrit-Change-Number: 15225 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Mark Petersen <bugs.digium.com@zombie.dk> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>