How to override the settings of a systemd unit
How to override the settings of a systemd unit?
Run systemctl with the 'edit' subcommand followed by the related unit to create an override file.
systemctl edit UNITThe systemctl command can show settings of a systemd unit, such as a service. It can also assist in overriding these settings by using the edit subcommand followed by the unit name. This will open the editor that is configured on the system and create the override file.
Usage
Run the edit command with the unit, and the editor like vim or nano will show up.
### Editing /etc/systemd/system/nginx.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
[Service]
ProtectSystem=strict
ReadWritePaths=/run /var/log/nginx
### Lines below this comment will be discarded
<snip>
Important: Do not remove the comments and only insert or change between the specified comment lines.