Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 605302 - net-im/coturn: install systemd unit file
Summary: net-im/coturn: install systemd unit file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas Schürch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2017-01-10 19:58 UTC by Michael Jones
Modified: 2017-04-03 17:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2017-01-10 19:58:31 UTC
Please install a systemd unit file for net-im/coturn.

An example unit file is as follows:

[Unit]
Description=turnserver daemon
After=networking.target

[Service]
Type=simple
ExecStart=/usr/bin/turnserver
Restart=always
RestartSec=30s

[Install]
WantedBy=multi-user.target





install in the ebuild like such:
systemd_dounit "${FILESDIR}"/${PN}.service
Comment 1 Andreas Schürch gentoo-dev 2017-04-01 10:50:45 UTC
I added a unit file now, but it got a bit more complex than the example above because of logging and logrotate....
Thanks
Comment 2 Michael Jones 2017-04-01 21:38:14 UTC
Thanks!

Out of curiosity, why use 

ExecStartPre=/bin/bash -c "[ -d /var/run/turnserver ] || mkdir /var/run/turnserver && chown turnserver:turnserver /var/run/turnserver"

Instead of systemd's tmpfilesd system?

https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
Comment 3 Andreas Schürch gentoo-dev 2017-04-03 17:06:08 UTC
(In reply to Michael Jones from comment #2)
> Thanks!
> 
> Out of curiosity, why use 
> 
> ExecStartPre=/bin/bash -c "[ -d /var/run/turnserver ] || mkdir
> /var/run/turnserver && chown turnserver:turnserver /var/run/turnserver"
> 
> Instead of systemd's tmpfilesd system?
> 
> https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

I simply wasn't aware of it and after using ExecStartPre for the logfile I thought it's straight forward.... 
I will keep it in mind for the next bump, thanks for pointing that out!