38 lines
771 B
Desktop File
38 lines
771 B
Desktop File
# /etc/systemd/system/asterisk.service
|
|
|
|
# "Borrowed" from https://g1fef.co.uk/asterisk-systemd-startup-script/
|
|
|
|
[Unit]
|
|
Description=Asterisk PBX and telephony daemon.
|
|
Wants=network.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=asterisk
|
|
Group=asterisk
|
|
RuntimeDirectory=asterisk
|
|
Environment=HOME=/var/lib/asterisk
|
|
WorkingDirectory=/var/lib/asterisk
|
|
|
|
ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf
|
|
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
|
|
ExecReload=/usr/sbin/asterisk -rx 'core reload'
|
|
|
|
# safe_asterisk emulation
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
#Nice=0
|
|
#UMask=0002
|
|
LimitCORE=infinity
|
|
#LimitNOFILE=
|
|
|
|
# Prevent duplication of logs with color codes to /var/log/messages
|
|
#StandardOutput=null
|
|
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|