SHARE
TWEET

Untitled

a guest Jun 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Unit]
  2. Description=control FOO daemon
  3. After=syslog.target network.target
  4.  
  5. [Service]
  6. Type=forking
  7. User=FOOd
  8. Group=FOO
  9. ExecStartPre=/bin/mkdir -p /var/run/FOOd/
  10. ExecStartPre=/bin/chown -R FOOd:FOO /var/run/FOOd/
  11. ExecStart=/usr/local/bin/FOOd -P /var/run/FOOd/FOOd.pid
  12. PIDFile=/var/run/FOOd/FOOd.pid
  13.  
  14. [Install]
  15. WantedBy=multi-user.target
  16.      
  17. ...
  18. Jun 03 16:18:49 PC0515546 mkdir[2469]: /bin/mkdir: cannot create directory /var/run/FOOd/: permission denied
  19. Jun 03 16:18:49 PC0515546 systemd[1]: FOOd.service: control  process exited, code=exited status=1
  20. ...
  21.      
  22. PermissionsStartOnly=true
  23.      
  24. RuntimeDirectory=, RuntimeDirectoryMode=
  25.        Takes a list of directory names. If set, one or more directories by
  26.        the specified names will be created below /run (for system
  27.        services) or below $XDG_RUNTIME_DIR (for user services) when the
  28.        unit is started, and removed when the unit is stopped. The
  29.        directories will have the access mode specified in
  30.        RuntimeDirectoryMode=, and will be owned by the user and group
  31.        specified in User= and Group=. Use this to manage one or more
  32.        runtime directories of the unit and bind their lifetime to the
  33.        daemon runtime. The specified directory names must be relative, and
  34.        may not include a "/", i.e. must refer to simple directories to
  35.        create or remove. This is particularly useful for unprivileged
  36.        daemons that cannot create runtime directories in /run due to lack
  37.        of privileges, and to make sure the runtime directory is cleaned up
  38.        automatically after use. For runtime directories that require more
  39.        complex or different configuration or lifetime guarantees, please
  40.        consider using tmpfiles.d(5).
  41.      
  42. [Unit]
  43. Description=control FOO daemon
  44. After=syslog.target network.target
  45.  
  46. [Service]
  47. Type=forking
  48. User=FOOd
  49. Group=FOO
  50. RuntimeDirectory=FOOd
  51. RuntimeDirectoryMode=$some-mode
  52. ExecStart=/usr/local/bin/FOOd -P /run/FOOd/FOOd.pid
  53. PIDFile=/run/FOOd/FOOd.pid
  54.  
  55. [Install]
  56. WantedBy=multi-user.target
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top