<p><b>@sergey-safarov</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575">pkg/kamailio/obs/kamailio.service</a>:</p>
<pre style='color:#555'>>  Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
 Environment='SHM_MEMORY=64'
 Environment='PKG_MEMORY=4'
+RuntimeDirectory=kamailio
+RuntimeDirectoryMode=0755
+PIDFile=/var/run/kamailio/kamailio.pid
</pre>
<p>Also look <a href="https://www.freedesktop.org/software/systemd/man/systemd.service.html" rel="nofollow"><code>https://www.freedesktop.org/software/systemd/man/systemd.service.html</code></a>.</p>
<pre><code>If set to forking, it is expected that the process configured with ExecStart= will call fork() as part of its start-up. The parent process is expected to exit when start-up is complete and all communication channels are set up. The child continues to run as the main daemon process. This is the behavior of traditional UNIX daemons. If this setting is used, it is recommended to also use the PIDFile= option, so that systemd can identify the main process of the daemon. systemd will proceed with starting follow-up units as soon as the parent process exits.
</code></pre>
<p><code>PIDFile</code> is used in case process started as working process. Now Kamailio is starts as <code>simple</code> process with <code>-DD</code> options. Main process is still alive and not need to use <code>PIDFile</code>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZSWTGNE4YalJo23zwz9D41NK6oHFks5u2DrXgaJpZM4ZCWBN">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZV2r-G0cOBrVf_t9atlKSyZ7KX7Pks5u2DrXgaJpZM4ZCWBN.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@sergey-safarov commented on #1754"}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575",
"url": "https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@sergey-safarov commented on 1754",
"sections": [
{
"text": "",
"activityTitle": "**sergey-safarov**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@sergey-safarov",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1754#discussion_r239244575"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 420044877\n}"
}
],
"themeColor": "26292E"
}
]</script>