You are not logged in.

#1 2013-10-16 20:38:53

lesto
Member
Registered: 2010-07-13
Posts: 115

where should i put my .service?

hi,
i've packaged a little daemon, freedns-daemon, but this question arised:

However I noticed that you install:
cp freedns-daemon.service "$pkgdir/usr/lib/systemd/system/"

shouldn't the service file be installed to /etc/systemd/system instead?

your 5 cent?

Last edited by lesto (2013-10-16 20:39:05)

Offline

#2 2013-10-16 20:41:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: where should i put my .service?

As I understand it, /etc/systemd/system is for user-created .service files whereas /usr/lib/systemd/system is for package-created .service files.  Since you are providing the .service via your package, I believe that is the proper location for it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2013-10-16 21:34:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: where should i put my .service?

Correct.

Offline

#4 2013-10-16 21:35:19

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: where should i put my .service?

I left a comment explaining the issue. To summarize it here for anyone that might be looking at this topic in the future:

/usr/lib/systemd is the *only* proper place for units supplied by packages; /etc/systemd is meant to be used for local configuration (custom unit files, overrides, etc.).

Offline

#5 2013-10-16 21:36:13

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: where should i put my .service?

msthev write:

/usr/lib/systemd is the *only* proper place for units supplied by packages; /etc/systemd is meant to be used for local configuration (custom unit files, overrides, etc.).
For more information consult systemd.unit(5), section Unit Load Path. You can also look at how other packages do this (`pacman -Ql | grep ' .*/systemd/system'`).

i'm too tired verify now, see you tomorrow

Offline

Board footer

Powered by FluxBB