ansible/roles/minecraft/templates/minecraft.service.j2

20 lines
525 B
Plaintext
Raw Normal View History

2019-10-05 21:41:47 +00:00
# {{ ansible_managed }}
[Unit]
Description=Minecraft server
After=network.target
[Service]
2019-10-27 23:36:54 +00:00
ExecStart=/usr/bin/java -Xmx{{ minecraft_java_xmx | default('1024M') }} -Xms{{ minecraft_java_xms | default('1024M') }} -jar {{ minecraft_opt_path }}/bin/server.jar nogui
SuccessExitStatus=143
2019-10-05 21:41:47 +00:00
Type=simple
User={{ minecraft_user }}
Group={{ minecraft_group }}
WorkingDirectory={{ minecraft_var_path }}
Restart=on-failure
SyslogIdentifier=minecraft
2019-10-27 23:36:54 +00:00
SyslogFacility={{ minecraft_syslog_facility }}
2019-10-05 21:41:47 +00:00
[Install]
WantedBy=multi-user.target