Advertisement
ricanlinux

jellyfin-container

Nov 30th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. $ cat /etc/systemd/system/machines.target.wants/[email protected]
  2. # SPDX-License-Identifier: LGPL-2.1+
  3. #
  4. # This file is part of systemd.
  5. #
  6. # systemd is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or
  9. # (at your option) any later version.
  10.  
  11. [Unit]
  12. Description=Container %i
  13. Documentation=man:systemd-nspawn(1)
  14. PartOf=machines.target
  15. Before=machines.target
  16. After=network.target systemd-resolved.service
  17. RequiresMountsFor=/var/lib/machines
  18.  
  19. [Service]
  20. DeviceAllow=/dev/dri rw
  21. DeviceAllow=/dev/dri/renderD128
  22. DeviceAllow=/dev/shm rw
  23. DeviceAllow=char-drm rwm
  24. ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --bind="$XAUTH" -E DISPLAY="$DISPLAY" -E XAUTHORITY="$XAUTH" --machine=%i
  25. KillMode=mixed
  26. Type=notify
  27. RestartForceExitStatus=133
  28. SuccessExitStatus=133
  29. WatchdogSec=3min
  30. Slice=machine.slice
  31. Delegate=yes
  32. TasksMax=16384
  33.  
  34. # Enforce a strict device policy, similar to the one nspawn configures when it
  35. # allocates its own scope unit. Make sure to keep these policies in sync if you
  36. # 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 implement
  42. # 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. # nspawn can set up LUKS encrypted loopback files, in which case it needs
  48. # access to /dev/mapper/control and the block devices /dev/mapper/*.
  49. DeviceAllow=/dev/mapper/control rw
  50. DeviceAllow=block-device-mapper rw
  51.  
  52. [Install]
  53. WantedBy=machines.target
  54.  
  55.  
  56.  
  57. -----------------------------------------------------------------------------------------------------------------
  58. $ cat /etc/systemd/nspawn/jellyfin.nspawn
  59. [Exec]
  60. Enviroment='DISPLAY=:0'
  61.  
  62. [Network]
  63. Port=tcp:2222:22
  64. Port=tcp:8096:8096
  65.  
  66. [Files]
  67. Bind=/dev/dri
  68. Bind=/tmp/.X11-unix
  69. Bind=/dev/shm
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement