Hi ,
Is it mandatory to use the directive RuntimeDirectory=mongodb in mongod systemd unitfile
Thanks
Satya
Hi @Satya_Oradba,
Searching a bit on the Internet, I found this:
RuntimeDirectory=foo/bar baz
the service manager creates /run/foo (if it does not exist), /run/foo/bar, and /run/baz. The directories /run/foo/bar and /run/baz except /run/foo are owned by the user and group specified in User= and Group=, and removed when the service is stopped.
Example: if a system service unit has the following,
RuntimeDirectory=foo/bar
StateDirectory=aaa/bbb ccc
then the environment variable “RUNTIME_DIRECTORY” is set with “/run/foo/bar”, and “STATE_DIRECTORY” is set with “/var/lib/aaa/bbb:/var/lib/ccc”.
Example: if a system service unit has the following,
RuntimeDirectory=foo:bar foo:baz
the service manager creates /run/foo (if it does not exist), and /run/bar plus /run/baz as symlinks to /run/foo.
Added in version 211.
Link:
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html
Regards
1 Like
chris
(Chris Dellaway)
3
I don’t recall this being needed by anything in particular. pifilepath is not set and the unix socket prefix is /tmp
What is prompting the removal of this option from the unit file?
1 Like
Thanks for the updates @chris @Fabio_Ramohitaj
Two mutually exclusive statements I think. 
I don’t recall this being needed by anything in particular. pifilepath is not set and the unix socket prefix is /tmp
What is prompting the removal of this option from the unit file?
Aren’t they ?
Thanks
Satya