Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have big problem with creating service in new way - by systemctl (systemd.service) in Fedora 16. I wonna to create very simple service for minidlna server. I have created new file called minidlna.service in /lib/systemd/system/ and here is how it's looks like:

[Unit]
Description=Mini DLNA

[Service]
Type=oneshot
ExecStart=/usr/sbin/minidlna

[Install]
WantedBy=multi-user.target

Unfortunately systemctl status minidlna.service prints:

  Loaded: loaded (/lib/systemd/system/minidlna.service; enabled)
  Active: inactive (dead) since Sat, 03 Dec 2011 20:49:23 +0100; 9s ago
Main PID: 1580 (code=exited, status=0/SUCCESS)
  CGroup: name=systemd:/system/minidlna.service

Any ideas how to fix it?

Cheers!

share|improve this question
    
In addition to the answer given, you may find Fedora's systemd packaging guidelines helpful. –  Michael Hampton Oct 23 '12 at 0:06
add comment

1 Answer

Try this. It works.

[Unit]
Description=Minidlna
After=network.target

[Service]
Type=forking
ExecStart=/usr/sbin/minidlna -R -f /etc/minidlna.conf

[Install]
WantedBy=multi-user.target
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.