Core: Add support for systemd socket activation.
authorCorey Farrell <git@cfware.com>
Mon, 19 Jun 2017 00:24:04 +0000 (20:24 -0400)
committerCorey Farrell <git@cfware.com>
Mon, 19 Jun 2017 17:33:48 +0000 (13:33 -0400)
commit70d2ccb9daa1926788b1296c6ccb2611341302d0
tree8fabbd863e110c9030fe28a788077f19b1d2e729
parent58d50025a0927f6ef75c2a5212b0f1b2bf51e344
Core: Add support for systemd socket activation.

This change adds support for socket activation of certain SOCK_STREAM
listeners in Asterisk:
* AMI / AMI over TLS
* CLI
* HTTP / HTTPS

Example systemd units are provided.  This support extends to any socket
which is initialized using ast_tcptls_server_start, so any unknown
modules using this function will support socket activation.

Asterisk continues to function as normal if socket activation is not
enabled or if systemd development headers are not available during
build.

ASTERISK-27063 #close

Change-Id: Id814ee6a892f4b80d018365c8ad8d89063474f4d
13 files changed:
contrib/systemd/README.txt [new file with mode: 0644]
contrib/systemd/asterisk-ami.socket [new file with mode: 0644]
contrib/systemd/asterisk-amis.socket [new file with mode: 0644]
contrib/systemd/asterisk-cli.socket [new file with mode: 0644]
contrib/systemd/asterisk-http.socket [new file with mode: 0644]
contrib/systemd/asterisk-https.socket [new file with mode: 0644]
contrib/systemd/asterisk.service [new file with mode: 0644]
contrib/systemd/asterisk.socket [new file with mode: 0644]
include/asterisk/io.h
include/asterisk/netsock2.h
main/asterisk.c
main/io.c
main/tcptls.c