使用systemctl停止服务后,服务仍处于失败状态
我们有一个简单的systemd脚本以服务方式启动MineCraft服务器。SO是CentOS7。这里的脚本: [Unit] Description=Minecraft Server After=syslog.target network.target [Service] Type=simple WorkingDirectory=/root/Minecraft ExecStart=/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui Restart=on-failure [Install] WantedBy=multi-user.target 启动服务可以正常工作,但是在停止时,服务仍处于失败状态。看到: systemctl status minecraftd.service minecraftd.service - Minecraft Server Loaded: loaded (/usr/lib/systemd/system/minecraftd.service; disabled) Active: active (running) since Mon 2015-06-01 16:00:12 UTC; 18s ago Main PID: 20975 (java) CGroup: /system.slice/minecraftd.service └─20975 /bin/java -Xmx1024M -Xms1024M …