27
hytale.service
Normal file
27
hytale.service
Normal file
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Hytale Game Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=mars3142
|
||||
Group=mars3142
|
||||
WorkingDirectory=/opt/hytale/Server
|
||||
|
||||
# SDKMAN Java path for user mars3142
|
||||
Environment="JAVA_HOME=/home/mars3142/.sdkman/candidates/java/current"
|
||||
Environment="PATH=/home/mars3142/.sdkman/candidates/java/current/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
|
||||
ExecStart=/home/mars3142/.sdkman/candidates/java/current/bin/java -jar HytaleServer.jar --assets ../Assets.zip
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
# Security hardening
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=/opt/hytale
|
||||
ProtectHome=read-only
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user