All,

This weekend I was working on setting up my XBMC server. To do this is need to run serveral programs, but I came to the conclusion that init is changed to systemd.
Not a problem you should say, however with init you could create daemon processes, which I could not find with systemd.
Solution was to build my own Daemonizer script per program where needed (since the programs I wanted to don't have PID).

So after searching I found the folowing script:
How to Daemonize in Linux [Doug Potter]

Problem is that I don't see how to use it. Of course I did fill in the daemon name and run as user.

After that I can compile with:
gcc -Wall daemon_script.c -o deamon

Which can be executed, but there doesn't happen a thing, so probably I do something wrong.
Please help me out, read complete artikel on the website but doesn't give me a clue?

Update:
Oke, working a little however a PID in /var/run is still missing and I get an error on:
"/var/lock/subsys/"

Because that folder does not exist on OpenSuSe 12.1. Hoe should this be adjusted to make it working.
Furthermore, how do I get a PID.