forked from strugee/minecraft-switcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minecraft-switcher.service
52 lines (48 loc) · 1.62 KB
/
minecraft-switcher.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# minecraft-switcher.service - systemd service file
#
# Copyright 2019 AJ Jordan <[email protected]>.
#
# This file is part of minecraft-switcher.
#
# minecraft-switcher is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# minecraft-switcher is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public
# License along with minecraft-switcher. If not, see
# <https://www.gnu.org/licenses/>.
[Unit]
Description=
Documentation=https://github.com/strugee/minecraft-switcher/blob/master/README.md
[Service]
Type=simple
ExecStart=/usr/bin/minecraft-switcher
Environment=NODE_ENV=production
# Security restrictions
# We can't do a whitelist-based {Inaccessible,ReadOnly,ReadWrite}Paths setup because it muddles execute perms
# Instead, we blacklist what we almost for sure don't need. This is obviously much worse, but what're you gonna do?
InaccessiblePaths=/bin
InaccessiblePaths=/boot
ReadOnlyPaths=/dev
InaccessiblePaths=/mnt
ReadOnlyPaths=/proc
InaccessiblePaths=/sbin
InaccessiblePaths=/sys
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectKernelModules=true
PrivateDevices=true
RestrictRealtime=true
PrivateTmp=true
[Install]
WantedBy=multi-user.target