Warm tip: This article is reproduced from serverfault.com, please click

How do I create 2 separate instances of a install4j application service on a linux machine

发布于 2020-11-28 19:14:42

I have created a "service" type Java application using install4j.

On windows I can install my application into 2 folders an providing I use a different name after running my app as administrator I can create to independent services

myapp /install service1 myapp /install service2

If I do the same on a linux machine both commands seem to create the same service and I cannot run them independently

Is there some way to allow me to run 2 instances of the same application under linux when they have been installed in different folders ?

./myapp_Service /install myapp Usage: ./myapp_Service {start|stop|run|run-redirect|status|restart|force-reload}

Questioner
Dave Garratt
Viewed
0
Ingo Kegel 2020-11-29 03:59:30

On Unix, there is no feature to install a service with a custom name by passing a service name as an argument. That extra argument will be ignored. You would have to copy the .service file that is created by the "Install a service" action (or present in the package) and modify its contents accordingly.