Re: [systemd-devel] template service unit include.d directory

2017-05-03 Thread Anoop Alias
Thanks.

Scheme  - /etc/systemd/system/PHP70@somet
hing.service.d/ works!





On Wed, May 3, 2017 at 7:58 PM, Tomasz Torcz  wrote:

> On Wed, May 03, 2017 at 07:51:45PM +0530, Anoop Alias wrote:
> > Hi,
> >
> > I am trying to include extra config for a template service file
> >
> > PHP70@.service
> >
> > ##
> >
> > I created /etc/systemd/system/PHP70@.service.d/something.d/test.conf
> >
> > According to the doc:
> > https://www.freedesktop.org/software/systemd/man/systemd.unit.html
> >
> > "Along with a unit file foo.service, a "drop-in" directory foo.service.d/
> > may exist. All files with the suffix ".conf" from this directory will be
> > parsed after the file itself is parsed. This is useful to alter or add
> > configuration settings for a unit, without having to modify unit files.
> > Each drop-in file must have appropriate section headers. Note that for
> > instantiated units, this logic will first look for the instance ".d/"
> > subdirectory and read its ".conf" files, followed by the template ".d/"
> > subdirectory and the ".conf" files there"
> >
> > What am I doing wrong here?
>
>   I think "instance .d/ subdirectory" would be:
>
>  /etc/systemd/system/PHP70@something.service.d/
>
>  and the "teplate .d/ subdirectory":
>
>  /etc/systemd/system/PHP70@.service.d/
>
>  rather than your scheme.
>
> > # systemctl --version
> > systemd 219
> > +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> > +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
> >
> > OS: CentOS Linux release 7.3.1611 (Core)
>
>   Always check local man pages. The online pages are appropriate for latest
> systed version.  The features described may not exist in such old versions
> as 219.
>
> --
> Tomasz TorczOnly gods can safely risk perfection,
> xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>



-- 
*Anoop P Alias*
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] template service unit include.d directory

2017-05-03 Thread Tomasz Torcz
On Wed, May 03, 2017 at 07:51:45PM +0530, Anoop Alias wrote:
> Hi,
> 
> I am trying to include extra config for a template service file
> 
> PHP70@.service
> 
> ##
> 
> I created /etc/systemd/system/PHP70@.service.d/something.d/test.conf
> 
> According to the doc:
> https://www.freedesktop.org/software/systemd/man/systemd.unit.html
> 
> "Along with a unit file foo.service, a "drop-in" directory foo.service.d/
> may exist. All files with the suffix ".conf" from this directory will be
> parsed after the file itself is parsed. This is useful to alter or add
> configuration settings for a unit, without having to modify unit files.
> Each drop-in file must have appropriate section headers. Note that for
> instantiated units, this logic will first look for the instance ".d/"
> subdirectory and read its ".conf" files, followed by the template ".d/"
> subdirectory and the ".conf" files there"
> 
> What am I doing wrong here?

  I think "instance .d/ subdirectory" would be:

 /etc/systemd/system/PHP70@something.service.d/

 and the "teplate .d/ subdirectory":

 /etc/systemd/system/PHP70@.service.d/

 rather than your scheme. 

> # systemctl --version
> systemd 219
> +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
> 
> OS: CentOS Linux release 7.3.1611 (Core)

  Always check local man pages. The online pages are appropriate for latest
systed version.  The features described may not exist in such old versions
as 219.

-- 
Tomasz TorczOnly gods can safely risk perfection,
xmpp: zdzich...@chrome.pl it's a dangerous thing for a man.  -- Alia

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] template service unit include.d directory

2017-05-03 Thread Anoop Alias
Hi,

I am trying to include extra config for a template service file

PHP70@.service

##

I created /etc/systemd/system/PHP70@.service.d/something.d/test.conf

But

systemctl start PHP70@something.service

does not include the file test.conf

According to the doc:
https://www.freedesktop.org/software/systemd/man/systemd.unit.html

"Along with a unit file foo.service, a "drop-in" directory foo.service.d/
may exist. All files with the suffix ".conf" from this directory will be
parsed after the file itself is parsed. This is useful to alter or add
configuration settings for a unit, without having to modify unit files.
Each drop-in file must have appropriate section headers. Note that for
instantiated units, this logic will first look for the instance ".d/"
subdirectory and read its ".conf" files, followed by the template ".d/"
subdirectory and the ".conf" files there"

What am I doing wrong here?

# systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP
+GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

OS: CentOS Linux release 7.3.1611 (Core)


Thanks in advance
-- 
*Anoop P Alias*
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] template service unit include.d directory

2017-05-03 Thread Silvio Knizek
Am Mittwoch, den 03.05.2017, 19:51 +0530 schrieb Anoop Alias:
> Hi,
> 
> I am trying to include extra config for a template service file
> 
> PHP70@.service
> 
> ##
> 
> I created /etc/systemd/system/PHP70@.service.d/something.d/t
> est.conf
> 
> But
> 
> systemctl start PHP70@something.service
> 
> does not include the file test.conf
> 
> According to the doc:
> https://www.freedesktop.org/software/systemd/man/systemd.unit.html
> 
> "Along with a unit file foo.service, a "drop-in" directory
> foo.service.d/
> may exist. All files with the suffix ".conf" from this directory will
> be
> parsed after the file itself is parsed. This is useful to alter or
> add
> configuration settings for a unit, without having to modify unit
> files.
> Each drop-in file must have appropriate section headers. Note that
> for
> instantiated units, this logic will first look for the instance ".d/"
> subdirectory and read its ".conf" files, followed by the template
> ".d/"
> subdirectory and the ".conf" files there"
> 
> What am I doing wrong here?
> 
> # systemctl --version
> systemd 219
> +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP
> +LIBCRYPTSETUP
> +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
> 
> OS: CentOS Linux release 7.3.1611 (Core)
> 
> 
> Thanks in advance

Hi Anoop,

the right directory for your drop-in is /etc/systemd/system/PHP70@somet
hing.service.d/
Use »systemctl cat PHP70@something« to see what is parsed.

BR
Silvio
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel