[asterisk-bugs] [JIRA] (ASTERISK-29216) systemd asterisk service for centos8 or other newer linux versions

Joshua C. Colp (JIRA) noreply at issues.asterisk.org
Thu Dec 17 08:40:16 CST 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-29216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua C. Colp updated ASTERISK-29216:
--------------------------------------

    Reference Notes: 



  was:
--- asterisk-18.1.0/contrib/systemd/asterisk.service	2020-11-19 13:39:40.000000000 +0100
+++ /usr/lib/systemd/system/asterisk.service	2020-12-17 15:30:19.341284656 +0100
@@ -1,15 +1,22 @@
 [Unit]
 Description=Asterisk PBX and telephony daemon.
 After=network.target
+#include these if asterisk need to bind to a specific 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 create it on start
+#RuntimeDirectory=asterisk
 
 #Nice=0
 #UMask=0002



> systemd asterisk service for centos8 or other newer linux versions
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-29216
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29216
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Contrib/General
>    Affects Versions: 18.1.0
>         Environment: Centos 8 systemd
>            Reporter: Mark Petersen
>            Severity: Trivial
>
> changes to contrib/systemd/asterisk.service
> text on how to fix different issue
> * if asterisk bind to something else than 0.0.0.0
> * if linux remove /var/run/asterisk on reboot
> * if you need hostname when using systemd



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list