Service Creator
Service creator requires Team Edition or higher.
How to include service creator
GUI Tool
Check "Include Service Creator" in the output page.
CLI Tool
Add the field "includeServiceCreator" in the task file.
includeServiceCreator: true
How to use Service Creator
Windows
The service creator of Windows is nssm
You can find this tool in the output folder, it needs to be used together with your executable file.
Install service
Enter the output folder and execute.
nssm install service-name exe-file-name [arguments]
# For Tomcat Application, go to tomcat/bin folder
nssm install service-name tomcat-launcher [jvm-arguments]
Start service
nssm start service-name;
Stop service
nssm stop service-name
View status
nssm status service-name
Remove service
nssm remove service-name
For detailed usage of nssm, please refer to https://nssm.cc/commands.
Linux
The service creator for Linux is based on systemctl.
Install Service
Enter the output folder and execute.
sudo ./service-creator service-name exe-file-name [arguments]
# For Tomcat Application, go to tomcat/bin folder
sudo ./service-creator service-name tomcat-launcher
After the service is created, it will automatically run and be set to startup with the system.
Check service status.
sudo systemctl status service-name
Stop service
sudo systemctl stop service-name
Start service
sudo systemctl start service-name
Disable automatic running
sudo systemctl disable service-name
Enable automatic running
sudo systemctl enable service-name
For detailed usage of systemctl, please refer to https://www.shubhamdipt.com/blog/how-to-create-a-systemd-service-in-linux/