From e1cec37f2728e16fb194dbd825dbf5a26dfdfc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Mih=C3=A1ly?= Date: Mon, 20 May 2019 15:27:49 +0200 Subject: [PATCH] From debian packaging some additions to the systemd example service file --- ChangeLog | 1 + examples/etc/coturn.service | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 512e5b1..66cb500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ Version 4.5.1.2 'dan Eider': * Now we put in turn_session_info->tls_method the real TLS version. Earlier we put UNKNOWN in this field if it was a TLS protocol that was not defined supportel TLS protocol during compile time. + - merge PR #276 Add systemd service example (by Liberasys) 02/03/2019 Oleg Moskalenko Mihály Mészáros Version 4.5.1.1 'dan Eider': diff --git a/examples/etc/coturn.service b/examples/etc/coturn.service index eae8c3e..45fb9a2 100644 --- a/examples/etc/coturn.service +++ b/examples/etc/coturn.service @@ -1,15 +1,24 @@ [Unit] -Description=coturn TURN Server -Before=multi-user.target -Before=graphical.target +Description=coTURN STUN/TURN Server +Documentation=man:coturn(1) man:turnadmin(1) man:turnserver(1) +After=network.target After=network-online.target After=remote-fs.target Wants=network-online.target [Service] -ExecStart=/usr/local/bin/turnserver +User=turnserver +Group=turnserver +Type=forking +RuntimeDirectory=turnserver +PIDFile=/run/turnserver/turnserver.pid +ExecStart=/usr/bin/turnserver --daemon -c /etc/turnserver.conf --pidfile /run/turnserver/turnserver.pid +#FixMe: turnserver exit faster than it is finshing the setup and ready for handling the connection. +ExecStartPost=/bin/sleep 2 +Restart=on-failure +InaccessibleDirectories=/home +PrivateTmp=yes [Install] WantedBy=multi-user.target Alias=turnserver.service -