aboutsummaryrefslogtreecommitdiffstats
path: root/roles/invidious/templates/etc/systemd
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-04 01:23:43 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-04 01:52:13 -0500
commit0261e875679f1bf63c8d689da7fc7e014597885d (patch)
tree3f19cd74a0c1070944f75437f30b098d6ef2ffcb /roles/invidious/templates/etc/systemd
downloadselfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.tar.gz
selfhosted-0261e875679f1bf63c8d689da7fc7e014597885d.zip
initial commit
Diffstat (limited to 'roles/invidious/templates/etc/systemd')
-rw-r--r--roles/invidious/templates/etc/systemd/system/invidious.service.j232
1 files changed, 32 insertions, 0 deletions
diff --git a/roles/invidious/templates/etc/systemd/system/invidious.service.j2 b/roles/invidious/templates/etc/systemd/system/invidious.service.j2
new file mode 100644
index 0000000..c711185
--- /dev/null
+++ b/roles/invidious/templates/etc/systemd/system/invidious.service.j2
@@ -0,0 +1,32 @@
+[Unit]
+Description=Invidious youtube client
+After=network.target
+AssertPathExists={{ invidious_install_dir }}
+
+[Service]
+Type=simple
+ExecStart={{ invidious_install_dir }}/invidious
+User={{ invidious_user }}
+Group={{ invidious_user }}
+WorkingDirectory={{ invidious_install_dir }}
+Restart=always
+
+# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
+# for details
+DevicePolicy=closed
+NoNewPrivileges=yes
+PrivateDevices=yes
+PrivateTmp=yes
+ProtectControlGroups=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
+RestrictNamespaces=yes
+RestrictRealtime=yes
+SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap
+
+ProtectSystem=full
+ProtectHome=true
+
+[Install]
+WantedBy=multi-user.target