0

I need to create a daemon process which should be started through init.d. I have experience of creating the package and installing it with appropriate start/stop scripts managed through init.d. However recently it is being managed through systeemd. Please let me know if there is basic tutorial to understand it and how to package so that installation of RPM should be as per systemd framework.

Adil
  • 2,418
  • 7
  • 34
  • 38

1 Answers1

2

Everything you need should be here on Fedora's page, under Packaging:Systemd.

Aaron D. Marasco
  • 6,506
  • 3
  • 26
  • 39
  • http://stackoverflow.com/users/836748/aaron-d-marasco Aaron thanks for answer. I need help. I have prepared the rpm spec file. But I dont know where to install / place my unit file i.e. .service file? Lets say I am installing my binary in /opt/xx/ directory. Where to put service file? – Adil Sep 18 '15 at 10:45
  • 1
    I'm guessing `/usr/lib/systemd/system/` with the others...? I've never done it; even on CentOS 7, I'm lazy and just ship the `init.d` scripts knowing they'll be compatible for a while. ;) – Aaron D. Marasco Sep 18 '15 at 14:39
  • Thanks Aaron. I installed it in the correct location under /usr/lib/systemd/system/daemon.service But while starting the service it failed. when i manually run the daemon binary it worked. – Adil Sep 21 '15 at 07:35
  • Sounds like a typical environmental issue, not a packaging issue. – Aaron D. Marasco Sep 21 '15 at 10:12