This shows you the differences between two versions of the page.
systemd [2018/08/22 16:23] k2patel created |
systemd [2020/08/10 02:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 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. | ||
- | - create extension folder | ||
- | - create extension files | ||
- | - check your extension | ||
- | |||
- | <code bash | creating extension> | ||
- | mkdir /etc/systemd/system/httpd.service.d | ||
- | </code> | ||
- | |||
- | <code bash | creating files to override specific variable> | ||
- | cat >/etc/systemd/system/httpd.service.d/limits.conf <<EOF | ||
- | [Service] | ||
- | LimitNOFILE=500000 | ||
- | EOF | ||
- | </code> | ||
- | |||
- | <code bash | check if your extension is recognized> | ||
- | systemd-delta --type=extended | ||
- | </code> | ||