Jump to content

Linux systemd service startup file


Recommended Posts



We have been running CentOS 7 successfully, but the server has not been automatically starting up with the legacy init.d startup scripts.


Do you have a ".service" script available to use with "systemd" startup that provides the same functionality?


Thank you!


Link to comment
Share on other sites

  • 3 weeks later...

I am using Ubuntu 15.10, which also uses systemd but will start init.d scripts using some transparent legacy startup script translation.   Getting plasticd to start on reboot was easy but not without some work.   This is how I did it


copy the existing plasticsd startup script into init.d

sudo cp /opt/plasticscm5/server/plasticsd /etc/init.d
cd /etc/init.d

apply patch plasticsd.txt.   This patch

  1. gets rid of the carriage return characters from the INIT INFO block
  2. adds the "Required-Start" INIT INFO to require the filesystem and the network to be started before plasicd (should have probably included the database server in there too)
  3. Set the home directory of plastic server 
  4. (can optionally be removed) changes the kill logic in the stop function to try to nicely kill the plastic daemon several times and will not remove the pid file if plasticd is still alive.  
patch < plasticsd.txt

make systemd recognize the new script and restart 

systemctl daemon-reload
service plasticsd restart
Link to comment
Share on other sites

 what is the output of 'systemctl status plasticsd'


alternatively you could create /etc/systemd/system/plasticsd.service and put the following in it:

Description=PlasticSCM Service
After=local-fs.target syslog.service network.target mysql.service

ExecStart=/opt/plasticscm5/server/plasticsd start
ExecStop=/opt/plasticscm5/server/plasticsd stop

Link to comment
Share on other sites

This is the output:

sudo systemctl status plasticsd
[sudo] password for codice: 
● plasticsd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

sudo systemctl daemon-reload
sudo service plasticsd restart
Failed to restart plasticsd.service: Unit plasticsd.service failed to load: No such file or directory.

Even with the "/etc/systemd/plasticsd.service" file I get the same error (I did the "systemctl daemon-reload")

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...