Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from pbugni/master
system properties and startup scripts
- Loading branch information
Showing
7 changed files
with
435 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#! /bin/sh | ||
# | ||
# /etc/init.d/cds -- startup script for OpenEMRConnect Central Document Store | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: cds | ||
# Required-Start: $local_fs $remote_fs $network | ||
# Required-Stop: $local_fs $remote_fs $network | ||
# Should-Start: $named | ||
# Should-Stop: $named | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start CDS | ||
# Description: Start the OpenEMRConnect Central Document Store | ||
### END INIT INFO | ||
|
||
|
||
NAME=cds | ||
|
||
CONFIGDIR="/etc/OpenEMRConnect/$NAME/" | ||
PIDFILE="/var/run/$NAME.pid" | ||
RUNTIMEDIR="/var/run/$NAME/" | ||
LOGDIR="/var/log/$NAME" | ||
LOGFILE="$LOGDIR/$NAME.log" | ||
UBERJAR="/opt/OpenEMRConnect/$NAME/$NAME-1.0-SNAPSHOT-jar-with-dependencies.jar" | ||
USER=oecuser | ||
DAEMON="/usr/bin/java" | ||
DAEMON_ARGS="-DconfigDirectory=$CONFIGDIR -DruntimeDirectory=$RUNTIMEDIR -jar $UBERJAR" | ||
|
||
if [ ! -d $RUNTIMEDIR ]; then | ||
mkdir $RUNTIMEDIR; | ||
chown $USER $RUNTIMEDIR; | ||
fi | ||
|
||
if [ ! -d $LOGDIR ]; then | ||
mkdir $LOGDIR; | ||
chown $USER $LOGDIR; | ||
fi | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting daemon: "$NAME | ||
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --verbose --make-pidfile --exec "$DAEMON" -- $DAEMON_ARGS >>$LOGFILE 2>&1 & | ||
echo "." | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping daemon: "$NAME | ||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 | ||
echo "." | ||
;; | ||
|
||
status) | ||
if kill -0 `cat $PIDFILE` > /dev/null 2>&1; then | ||
echo "Running" | ||
exit 0 | ||
else | ||
echo "Not running" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
*) | ||
echo "Usage: "$1" {start|stop|status}" | ||
exit 1 | ||
|
||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#! /bin/sh | ||
# | ||
# /etc/init.d/esb -- startup script for OpenEMRConnect Enterprise Service Bus | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: esb | ||
# Required-Start: $local_fs $remote_fs $network | ||
# Required-Stop: $local_fs $remote_fs $network | ||
# Should-Start: $named | ||
# Should-Stop: $named | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start ESB | ||
# Description: Start the OpenEMRConnect Enterprise Service Bus | ||
### END INIT INFO | ||
|
||
|
||
NAME=esb | ||
|
||
CONFIGDIR="/etc/OpenEMRConnect/$NAME/" | ||
PIDFILE="/var/run/$NAME.pid" | ||
RUNTIMEDIR="/var/run/$NAME/" | ||
LOGDIR="/var/log/$NAME" | ||
LOGFILE="$LOGDIR/$NAME.log" | ||
UBERJAR="/opt/OpenEMRConnect/$NAME/$NAME-1.0-SNAPSHOT-jar-with-dependencies.jar" | ||
USER=oecuser | ||
DAEMON="/usr/bin/java" | ||
DAEMON_ARGS="-DconfigDirectory=$CONFIGDIR -DruntimeDirectory=$RUNTIMEDIR -jar $UBERJAR" | ||
|
||
if [ ! -d $RUNTIMEDIR ]; then | ||
mkdir $RUNTIMEDIR; | ||
chown $USER $RUNTIMEDIR; | ||
fi | ||
|
||
if [ ! -d $LOGDIR ]; then | ||
mkdir $LOGDIR; | ||
chown $USER $LOGDIR; | ||
fi | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting daemon: "$NAME | ||
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --verbose --make-pidfile --exec "$DAEMON" -- $DAEMON_ARGS >>$LOGFILE 2>&1 & | ||
echo "." | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping daemon: "$NAME | ||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 | ||
echo "." | ||
;; | ||
|
||
status) | ||
if kill -0 `cat $PIDFILE` > /dev/null 2>&1; then | ||
echo "$NAME Running" | ||
exit 0 | ||
else | ||
echo "$NAME Not running" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
*) | ||
echo "Usage: "$1" {start|stop|status}" | ||
exit 1 | ||
|
||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#! /bin/sh | ||
# | ||
# /etc/init.d/fsb -- startup script for OpenEMRConnect Facilities Service Bus | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: fsb | ||
# Required-Start: $local_fs $remote_fs $network | ||
# Required-Stop: $local_fs $remote_fs $network | ||
# Should-Start: $named | ||
# Should-Stop: $named | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start FSB | ||
# Description: Start the OpenEMRConnect Facilities Service Bus | ||
### END INIT INFO | ||
|
||
|
||
NAME=fsb | ||
PACKAGE=esb | ||
|
||
CONFIGDIR="/etc/OpenEMRConnect/$NAME/" | ||
PIDFILE="/var/run/$NAME.pid" | ||
RUNTIMEDIR="/var/run/$NAME/" | ||
LOGDIR="/var/log/$NAME" | ||
LOGFILE="$LOGDIR/$NAME.log" | ||
UBERJAR="/opt/OpenEMRConnect/$NAME/$PACKAGE-1.0-SNAPSHOT-jar-with-dependencies.jar" | ||
USER=oecuser | ||
DAEMON="/usr/bin/java" | ||
DAEMON_ARGS="-DconfigDirectory=$CONFIGDIR -DruntimeDirectory=$RUNTIMEDIR -jar $UBERJAR" | ||
|
||
if [ ! -d $RUNTIMEDIR ]; then | ||
mkdir $RUNTIMEDIR; | ||
chown $USER $RUNTIMEDIR; | ||
fi | ||
|
||
if [ ! -d $LOGDIR ]; then | ||
mkdir $LOGDIR; | ||
chown $USER $LOGDIR; | ||
fi | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting daemon: "$NAME | ||
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --verbose --make-pidfile --exec "$DAEMON" -- $DAEMON_ARGS >>$LOGFILE 2>&1 & | ||
echo "." | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping daemon: "$NAME | ||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 | ||
echo "." | ||
;; | ||
|
||
status) | ||
if kill -0 `cat $PIDFILE` > /dev/null 2>&1; then | ||
echo "$NAME Running" | ||
exit 0 | ||
else | ||
echo "$NAME Not running" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
*) | ||
echo "Usage: "$1" {start|stop|status}" | ||
exit 1 | ||
|
||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#! /bin/sh | ||
# | ||
# /etc/init.d/loggingserver -- startup script for OpenEMRConnect Logging Server | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: loggingserver | ||
# Required-Start: $local_fs $remote_fs $network | ||
# Required-Stop: $local_fs $remote_fs $network | ||
# Should-Start: $named | ||
# Should-Stop: $named | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start LOGGINGSERVER | ||
# Description: Start the OpenEMRConnect Logging Server | ||
### END INIT INFO | ||
|
||
|
||
NAME=loggingserver | ||
|
||
CONFIGDIR="/etc/OpenEMRConnect/$NAME/" | ||
PIDFILE="/var/run/$NAME.pid" | ||
RUNTIMEDIR="/var/run/$NAME/" | ||
LOGDIR="/var/log/$NAME" | ||
LOGFILE="$LOGDIR/$NAME.log" | ||
UBERJAR="/opt/OpenEMRConnect/$NAME/$NAME-1.0-SNAPSHOT-jar-with-dependencies.jar" | ||
USER=oecuser | ||
DAEMON="/usr/bin/java" | ||
DAEMON_ARGS="-DconfigDirectory=$CONFIGDIR -DruntimeDirectory=$RUNTIMEDIR -jar $UBERJAR" | ||
|
||
if [ ! -d $RUNTIMEDIR ]; then | ||
mkdir $RUNTIMEDIR; | ||
chown $USER $RUNTIMEDIR; | ||
fi | ||
|
||
if [ ! -d $LOGDIR ]; then | ||
mkdir $LOGDIR; | ||
chown $USER $LOGDIR; | ||
fi | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting daemon: "$NAME | ||
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --verbose --make-pidfile --exec "$DAEMON" -- $DAEMON_ARGS >>$LOGFILE 2>&1 & | ||
echo "." | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping daemon: "$NAME | ||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 | ||
echo "." | ||
;; | ||
|
||
status) | ||
if kill -0 `cat $PIDFILE` > /dev/null 2>&1; then | ||
echo "Running" | ||
exit 0 | ||
else | ||
echo "Not running" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
*) | ||
echo "Usage: "$1" {start|stop|status}" | ||
exit 1 | ||
|
||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#! /bin/sh | ||
# | ||
# /etc/init.d/lpi -- startup script for OpenEMRConnect Local Patient Index | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: lpi | ||
# Required-Start: $local_fs $remote_fs $network | ||
# Required-Stop: $local_fs $remote_fs $network | ||
# Should-Start: $named | ||
# Should-Stop: $named | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start LPI | ||
# Description: Start the OpenEMRConnect Local Patient Index | ||
### END INIT INFO | ||
|
||
|
||
NAME=lpi | ||
PACKAGE=mpi | ||
|
||
CONFIGDIR="/etc/OpenEMRConnect/$NAME/" | ||
PIDFILE="/var/run/$NAME.pid" | ||
RUNTIMEDIR="/var/run/$NAME/" | ||
LOGDIR="/var/log/$NAME" | ||
LOGFILE="$LOGDIR/$NAME.log" | ||
UBERJAR="/opt/OpenEMRConnect/$NAME/$PACKAGE-1.0-SNAPSHOT-jar-with-dependencies.jar" | ||
USER=oecuser | ||
DAEMON="/usr/bin/java" | ||
DAEMON_ARGS="-DconfigDirectory=$CONFIGDIR -DruntimeDirectory=$RUNTIMEDIR -jar $UBERJAR" | ||
|
||
if [ ! -d $RUNTIMEDIR ]; then | ||
mkdir $RUNTIMEDIR; | ||
chown $USER $RUNTIMEDIR; | ||
fi | ||
|
||
if [ ! -d $LOGDIR ]; then | ||
mkdir $LOGDIR; | ||
chown $USER $LOGDIR; | ||
fi | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting daemon: "$NAME | ||
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --verbose --make-pidfile --exec "$DAEMON" -- $DAEMON_ARGS >>$LOGFILE 2>&1 & | ||
echo "." | ||
;; | ||
|
||
stop) | ||
echo -n "Stopping daemon: "$NAME | ||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry=TERM/30/KILL/5 | ||
echo "." | ||
;; | ||
|
||
status) | ||
if kill -0 `cat $PIDFILE` > /dev/null 2>&1; then | ||
echo "$NAME Running" | ||
exit 0 | ||
else | ||
echo "$NAME Not running" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
*) | ||
echo "Usage: "$1" {start|stop|status}" | ||
exit 1 | ||
|
||
esac | ||
|
||
exit 0 |
Oops, something went wrong.