User Tools

Site Tools


systemd

This is an old revision of the document!


systemd

Extending configuration

This has bitten me many times, specially if you are running services as different user or require to extend the file limits.
Everytime there is update it replaces the file and it create the issue of broken services.

Here is simple example of overriding the configuration.

  1. create extension folder
  2. create extension files
  3. check your extension
| creating extension
mkdir /etc/systemd/system/httpd.service.d
| creating files to override specific variable
cat >/etc/systemd/system/httpd.service.d/limits.conf <<EOF
[Service]
LimitNOFILE=500000
EOF
-OR-
systemctl edit httpd
| check if your extension is recognized
systemd-delta --type=extended
systemd.1534955904.txt.gz · Last modified: 2018/08/22 12:38 by k2patel