Need help auto-starting new daemon with systemd [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Need help auto-starting new daemon with systemd [Solved]

Postby VolvoBirkenstock » Wed Sep 04, 2013 5:28

I performed a search on this site but couldn't find an explicit instruction set for how to auto-start a new daemon with systemd.

I recently purchased a UPS and have the vendor-supplied daemon-executable. The vendor installation shell-script failed to configure the daemon for auto-start during boot because the installation shell-script did not have a subsection that addressed systemd. I know how to set up modules in systemd (because of assistance from this excellent forum), but I do not know how to set up daemons for auto-start during boot. Can anyone here please provide an explicit set of instructions (or provide a link) for configuring a daemon so it will auto-start during boot?

I know that the daemon works correctly since I can manually start it as root and query it using a second vendor-supplied executable.

Thank you very much in advance.
Last edited by VolvoBirkenstock on Fri Sep 06, 2013 5:22, edited 1 time in total.
VolvoBirkenstock
Growing Hen
 
Posts: 158
Joined: Sun Mar 31, 2013 5:34

Re: Need help auto-starting new daemon with systemd

Postby linuxfluesterer » Wed Sep 04, 2013 8:13

Hallo Volvo.
Exactly, it is not too much different to start a script (a batch file) when booting with systemd comparing to sysvinit (OpenRC).
VolvoBirkenstock wrote:I know that the daemon works correctly since I can manually start it as root and query it using a second vendor-supplied executab

You can put a script, which contains your manually command to start your daemon into directory /etc/local.d
A script to start at boot must have the extension .start (e.g. upsdaemon.start).
The next point is, that systemd must be told to enable the local-d.service while booting.
You can enable as root with:
Code: Select all
systemctl enable local-d.service

And, if you are interested in the status of your (systemd) services, then do this (as root):
Code: Select all
systemctl --show

Hope to help you.

-Linuxfluesterer (I love KDE ...)
I really hope, that by the Brexit (poor Britain), TTIP will be finally prevented. But don't get tired to talk to your local politician to open eyes for danger to democracy because of TTIP
User avatar
linuxfluesterer
Old Dear Hen
 
Posts: 725
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: Need help auto-starting new daemon with systemd [Solved]

Postby VolvoBirkenstock » Fri Sep 06, 2013 5:24

Linuxfluesterer, you have done it yet again!
Most excellent, Sir!
I have placed this thread into the "Solved" state. :-)
Thank you VERY much!
VolvoBirkenstock
Growing Hen
 
Posts: 158
Joined: Sun Mar 31, 2013 5:34


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 2 guests

cron