Creating custom systemd Service File

I had a requirement at work where in I need to create linux systemd custom services. But when I try to enable them by “systemctl enable abc.service”, an error is displayed:

“Failed to issue method call: No such file or directory”

Normally, we look for these custom files in the /etc/systemd/system/ directory and everything should work, though not sure why it doesn’t work now. Based on a post I read, systemd would look at the /usr/lib/systemd/system as well. So what I did is I added my custom service files in that directory, run “systemctl enable abc.service” again and alas! it did work. It is somehow a dirty solution but it did fix my problem, whew.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s