> official way is to copy the unit file to  /etc/systemd/system and edit
> this copy.

that's one way to do it. It has the disadvantage of overriding *all* settings 
in the vendor-supplied unit files, which may be changed or extended in later 
releases. 

I prefer the other supported way (see 
<https://www.freedesktop.org/software/systemd/man/systemd.unit.html>):

1. Create a directory named after the unit in /etc/systemd/system, 
/etc/systemd/system/httpd.service.d/

2. Create an override file within that directory, for instance 
private-tmp.conf, with the following contents: 

  [Service]
  PrivateTmp=false

3. Run "systemd daemon-reload" and "systemd restart httpd"

You can verify that the override file has been loaded with 

> [root@master1 ~]# systemctl status httpd
> ● httpd.service - The Apache HTTP Server
>    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor 
> preset: disabled)
>   Drop-In: /etc/systemd/system/httpd.service.d
>            └─private-tmp.conf

This will override only the setting you want to override and still survive 
updates.

_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos

Reply via email to