# systemctl 管理jar包启动
[Unit]
Description=lnk-service
After=syslog.target network.target remote-fs.target nss-lookup.target
​
[Service]
Type=simple
​
User=root
Group=root
​
#延迟启动
ExecStartPre=/bin/sleep 10
​
#启动路径
ExecStart=/usr/local/jdk1.8.0_261/bin/java  -jar /home/dpan/server/lnk/lnk-admin.jar
​
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
​
PrivateTmp=true
​
[Install]
WantedBy=multi-user.target