Fedora Linux Support Community & Resources Center
  #1  
Old 21st August 2011, 09:49 PM
SvenVD Offline
Registered User
 
Join Date: Aug 2011
Posts: 1
windows_7firefox
Make service unit for systemd which runs screen

Hi,

I am running Fedora 15

I would like to make a service.unit for systemd that starts rtorrent(or any other interactive daemon) in a screen session for user sven at boot.

The following I've got so far
Code:
[Unit]
Description=Starts rtorrent in a screen environment for the user sven

[Service]
Type=oneshot
ExecStart=/bin/su -c "/usr/bin/screen -A -d -m -S rtorrent /usr/bin/rtorrent" sven

[Install]
WantedBy=multi-user.target
Code:
systemctl enable rtorrentsven.service
ln -s '/lib/systemd/system/rtorrentsven.service' '/etc/systemd/system/multi-user.target.wants/rtorrentsven.service'
However it is not working as expected:
  • The service is not started at boot
  • if I start the service manually (systemctl start), then the screen is running and working as expected, but ..

In both cases status is showing
Code:
systemctl status rtorrentsven.service
rtorrentsven.service - Starts rtorrent in a screen environment for the user sven
          Loaded: loaded (/lib/systemd/system/rtorrentsven.service)
          Active: inactive (dead) since Sun, 21 Aug 2011 21:44:41 +0200; 2min 11s ago
        Main PID: 684 (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/rtorrentsven.service
inactive/dead

Please advise

Thanks!
Reply With Quote
Reply

Tags
make, runs, screen, service, systemd, unit

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unit akmods.service entered failed state. sashko Using Fedora 0 4th August 2011 04:30 AM
Writing new systemd service. How to STOP kdm daemon? charlweed Using Fedora 0 1st August 2011 10:58 PM
Simple display of systemd service sequence charlweed Using Fedora 2 13th July 2011 06:34 AM
systemd exec 203 failed service startup (a non-starter, so to speak) m1boli Using Fedora 0 29th June 2011 03:10 AM
What service runs every five minutes? danwaineo Using Fedora 7 8th June 2007 07:22 AM


Current GMT-time: 13:57 (Wednesday, 26-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Art Khwajah Travel Photos on Instagram - Radlin Photos on Instagram - Nirmali