Guest User

Untitled

a guest
Feb 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. # This file is part of systemd.
  2. #
  3. # systemd is free software; you can redistribute it and/or modify it
  4. # under the terms of the GNU Lesser General Public License as published by
  5. # the Free Software Foundation; either version 2.1 of the License, or
  6. # (at your option) any later version.
  7.  
  8. [Unit]
  9. Description=nspawn container sniproxy
  10. Documentation=man:systemd-nspawn(1)
  11. PartOf=machines.target
  12. Before=machines.target
  13. After=network.target
  14.  
  15. [Service]
  16. ExecStart=/usr/bin/systemd-nspawn \
  17. --quiet \
  18. --keep-unit \
  19. --boot \
  20. --link-journal=try-guest \
  21. --network-veth -U \
  22. --settings=override \
  23. --machine=sniproxy \
  24. --port=80 \
  25. --port=443
  26. KillMode=mixed
  27. Type=notify
  28. RestartForceExitStatus=133
  29. SuccessExitStatus=133
  30. Slice=machine.slice
  31. Delegate=yes
  32. TasksMax=16384
  33.  
  34. # Enforce a strict device policy, similar to the one nspawn configures
  35. # when it allocates its own scope unit. Make sure to keep these
  36. # policies in sync if you change them!
  37. DevicePolicy=closed
  38. DeviceAllow=/dev/net/tun rwm
  39. DeviceAllow=char-pts rw
  40.  
  41. # nspawn itself needs access to /dev/loop-control and /dev/loop, to
  42. # implement the --image= option. Add these here, too.
  43. DeviceAllow=/dev/loop-control rw
  44. DeviceAllow=block-loop rw
  45. DeviceAllow=block-blkext rw
  46.  
  47. [Install]
  48. WantedBy=machines.target
Add Comment
Please, Sign In to add comment