...
...
...
...
Warning | ||
---|---|---|
| ||
Note | ||
This page is outdated and no longer receives updates! |
These are the steps to follow for making the OpenMRS launch automatically. We want our server to start automatically, so it starts after booting the pc and when is network available.
Sript for launching the openmrs server:
...
#!/bin/bash
...
cd
...
/home/pere/Documents/referenceapplication-standalone-2.7.0/
...
java
...
-jar
...
openmrs-standalone.jar
...
-commandline
...
-tomcatport
...
8081
Info |
---|
Number of port used by tomcat is arbitrary |
...
Now, create a file called: /lib/system/system/OpenMRS.service
It has to contain:
...
[Unit]
...
Description=Launch
...
OpenMRS
...
server
...
service
...
After=network.target
...
StartLimitIntervalSec=0
...
[Service]
...
Type=simple
...
RestartSec=1
...
User=pere
...
ExecStart=/usr/local/bin/launchServer.sh
...
[Install]
...
WantedBy=multi-user.target
Info |
---|
Where |
Now, start the service:
$ sudo systemctl start OpenMRS
...