Skip to content

Commit

Permalink
Merge branch 'tomcat9'
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich committed Sep 1, 2023
2 parents e189546 + 0833582 commit 1f2c0dd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ A few links from the OpenMRS wiki that are worth reading:
* High-level overview of OpenMRS: https://wiki.openmrs.org/display/docs/Introduction+to+OpenMRS
* Overview of the OpenMRS data model: https://wiki.openmrs.org/display/docs/Data+Model
* Definition of an "OpenMRS distribution": https://wiki.openmrs.org/display/docs/OpenMRS+Distributions
* Definition of an "OpenMRS distribution": https://wiki.openmrs.org/display/docs/OpenMRS+Distributions

Therep are 40+ OpenMRS modules that make up the PIH EMR, of which most are OpenMRS community modules, but also includes
some PIH-specific modules as well. The [pihcore module](https://github.com/PIH/openmrs-module-pihcore) is the most
Expand Down
10 changes: 5 additions & 5 deletions debian/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ perl -pi -e "s/pihemr \([^)]+\)/pihemr (1.0.${BUILD_NUMBER}-1)/" ${PACKAGE_DIR}/

cp ${DISTRO_DIR}/openmrs.war ${PACKAGE_DIR}/openmrs.war

mkdir -p ${PACKAGE_DIR}/home/tomcat7/.OpenMRS/modules/
cp ${DISTRO_DIR}/modules/* ${PACKAGE_DIR}/home/tomcat7/.OpenMRS/modules/
mkdir -p ${PACKAGE_DIR}/home/tomcat/.OpenMRS/modules/
cp ${DISTRO_DIR}/modules/* ${PACKAGE_DIR}/home/tomcat/.OpenMRS/modules/

mkdir -p ${PACKAGE_DIR}/home/tomcat7/.OpenMRS/owa/
cp ${DISTRO_DIR}/owa/* ${PACKAGE_DIR}/home/tomcat7/.OpenMRS/owa/
rename 's/\.owa$/.zip/' ${PACKAGE_DIR}/home/tomcat7/.OpenMRS/owa/*.owa
mkdir -p ${PACKAGE_DIR}/home/tomcat/.OpenMRS/owa/
cp ${DISTRO_DIR}/owa/* ${PACKAGE_DIR}/home/tomcat/.OpenMRS/owa/
rename 's/\.owa$/.zip/' ${PACKAGE_DIR}/home/tomcat/.OpenMRS/owa/*.owa

cd ${PACKAGE_DIR} && debuild --no-tgz-check -i -us -uc -b
2 changes: 1 addition & 1 deletion debian/package/debian/pihemr.conffiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/home/tomcat7/.OpenMRS/openmrs-runtime.properties
/home/tomcat/.OpenMRS/openmrs-runtime.properties
4 changes: 2 additions & 2 deletions debian/package/debian/pihemr.install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
home/tomcat7/.OpenMRS home/tomcat7/
home/tomcat/.OpenMRS home/tomcat/
etc/default/* etc/default/
openmrs.war var/lib/tomcat7/webapps/
openmrs.war var/lib/tomcat9/webapps/
10 changes: 5 additions & 5 deletions debian/package/debian/pihemr.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ case "$1" in
configure)

# for mirebalais implementation, rename the war
if [ -f /home/tomcat7/.OpenMRS/mirebalais-runtime.properties ]
if [ -f /home/tomcat/.OpenMRS/mirebalais-runtime.properties ]
then
mv -f /var/lib/tomcat7/webapps/openmrs.war /var/lib/tomcat7/webapps/mirebalais.war
mv -f /var/lib/tomcat9/webapps/openmrs.war /var/lib/tomcat9/webapps/mirebalais.war
fi

chown -R tomcat7:tomcat7 /home/tomcat7/.OpenMRS
chown -R tomcat7:tomcat7 /var/lib/tomcat7
chown -R tomcat:tomcat /home/tomcat/.OpenMRS
chown -R tomcat:tomcat /var/lib/tomcat9

if [ -n "$2" ]
then
#this means it's an upgrade. on clean install, we don't want to start tomcat
service tomcat7 start
service tomcat9 start
if service --status-all | grep -Fq 'apache2'; then
service apache2 restart
fi
Expand Down
18 changes: 9 additions & 9 deletions debian/package/debian/pihemr.preinst
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ case "$1" in
# sh /usr/local/sbin/mysqlbackup.sh $2
# fi

service tomcat7 stop

rm -rf /var/lib/tomcat7/webapps/openmrs
rm -rf /var/lib/tomcat7/webapps/mirebalais
rm -rf /var/lib/tomcat7/temp/*
rm -rf /var/lib/tomcat7/work/*
rm -rf /home/tomcat7/.OpenMRS/modules
rm -rf /home/tomcat7/.OpenMRS/owa
rm -rf /home/tomcat7/.OpenMRS/.openmrs-lib-cache
service tomcat9 stop

rm -rf /var/lib/tomcat9/webapps/openmrs
rm -rf /var/lib/tomcat9/webapps/mirebalais
rm -rf /var/lib/tomcat9/temp/*
rm -rf /var/lib/tomcat9/work/*
rm -rf /home/tomcat/.OpenMRS/modules
rm -rf /home/tomcat/.OpenMRS/owa
rm -rf /home/tomcat/.OpenMRS/.openmrs-lib-cache
;;

abort-upgrade)
Expand Down
2 changes: 1 addition & 1 deletion docs/docker/docker-compose/openmrs-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV OPENMRS_MEMORY_OPTS="-Xmx2048m -Xms1024m -XX:PermSize=256m -XX:MaxPermSize=5
ENV OPENMRS_OTHER_OPTS="-server -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Djava.awt.headlesslib=true"
ENV OPENMRS_RUNTIME_PROPERTIES_FILE="/openmrs/openmrs-runtime.properties"

ADD openmrs-setenv.sh /usr/share/tomcat7/bin/setenv.sh
ADD openmrs-setenv.sh /usr/share/tomcat9/bin/setenv.sh

# These represent the folders created and used within the container
# Any webapps one wishes to run should be mounted into /openmrs/artifacts/webapps
Expand Down

0 comments on commit 1f2c0dd

Please sign in to comment.