23 lines
466 B
Desktop File
23 lines
466 B
Desktop File
[Unit]
|
|
Description=Minecraft Server
|
|
After=network.target
|
|
|
|
[Service]
|
|
# Replace the following with correct values
|
|
ExecStart=/bin/bash /home/ubuntu/mc/start.sh
|
|
User=ubuntu
|
|
Group=ubuntu
|
|
WorkingDirectory=/home/ubuntu/mc
|
|
ExecStop=/bin/sh -c "echo stop > /home/ubuntu/mc/minecraft.control"
|
|
KillSignal=SIGCONT
|
|
|
|
Sockets=minecraft.socket
|
|
StandardInput=socket
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
Restart=on-failure
|
|
RestartSec=60s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |