# sytemd vs init.d question

**URL:** <https://forums.suse.com/t/sytemd-vs-init-d-question/27159>\
**Category:** SLES Configure-Administer\
**Created:** [June 16, 2015, 9:32pm UTC](https://forums.suse.com/t/sytemd-vs-init-d-question/27159 "2015-06-16T21:32:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [June 16, 2015, 9:32pm UTC](https://forums.suse.com/t/sytemd-vs-init-d-question/27159/1 "2015-06-16T21:32:17Z")

</div>

I’m currently bringing up a memcached server (had to compile from source, not included in suse12) and I’m trying to add the newrelic plugin to monitor.

Everything is installed, I have memcache set up as a systemd service, runs fine, but the newrelic plugin is java based and has a init.d script.

Now if I run the init.d script /etc/init.d/newrelic\_plugin\_memcached it runs just fine. But if I try to run the same script using service or systemctl is fails to start.

Isn’t there a line I can add to a init.d script so the the system just runs the script as it should ? very frustrating.  
I’ve also looked at other init.d scripts and I’ll be damed if I can see why one script works fine through service and others don’t in this new systemd setup.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [June 16, 2015, 11:07pm UTC](https://forums.suse.com/t/sytemd-vs-init-d-question/27159/2 "2015-06-16T23:07:46Z")

</div>

Differences: I’d check the top of the init scripts to see if anything  
stands out there. Does ‘chkconfig -l’ show either of them, or both of  
them? Have you considered creating a systemd service configuration file  
instead of trying to use the sys-V init script?

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![cisaksen](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cisaksen](https://forums.suse.com/u/cisaksen)\
**Post date:** [June 17, 2015, 12:31am UTC](https://forums.suse.com/t/sytemd-vs-init-d-question/27159/3 "2015-06-17T00:31:53Z")

</div>

No unfortunately - nothing stands out in the script format.

The biggest difference is this. In the ones that do work ok through systemd they all call a actual program.

This script calls this: sudo -u root java -Xmx128m “-Dnewrelic.platform.config.dir=/opt/newrelic-npi/plugins/com.newrelic.plugins.memcached/newrelic\_memcached\_plugin-2.0.1/config” -jar “/opt/newrelic-npi/plugins/com.newrelic.plugins.memcached/newrelic\_memcached\_plugin-2.0.1/plugin.jar” \>\> $DAEMONDIR/daemon.log 2\>&1 &

don’t if this makes a difference - not even sure if this command is even possible in a service file.
