Soabase Launcher Script
The Soabase launcher is a simple launcher that can be set via init.d to auto-run and control your application.
Commands
The service.sh script supports these commands:
- help - displays help text
- start - starts the application in the background and saves its pid
- run - runs the application in the foreground and saves its pid
- stop - stops the application
- restart - if the application is running, restarts the application
- force-start - stops the application if running (or not) and then restarts it
- status - displays the application's pid if it's running
Directory Structure
<root dir>
\___ your-uber-jar-nnnn.jar
\___ bin
\_____ service.sh
\___ config
\_____ arguments.txt
\_____ jvm.properties
\_____ *.json
\_____ *.yaml
NOTES:
- The uber jar can optionally be in the bin directory
- The config directory is optional as is each file in it
- You can have a config.json or a config.yaml, it can have any name, but only 1 will be used
- If arguments.txt is present it should contain application arguments (single line or 1 per line). The string $CONFIG_FILE in your arguments file will be replaced with the path to your config file. If arguments.txt is not present and there is a config file, the arguments to the application are: server config.nnn
Installing
Add an init.d script that executes service.sh. NOTE: make sure service.sh has execute permissions.