From cda2d83779539edff35f5fb6140b4edee1e373ed Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 8 Dec 2017 08:12:15 +0100 Subject: [PATCH] Move Sigmah application files to /srv --- sigmah.sh | 9 +++++---- .../sigmah/WEB-INF/classes/META-INF/persistence.xml | 0 .../sigmah/WEB-INF/classes/sigmah.properties | 0 3 files changed, 5 insertions(+), 4 deletions(-) rename sigmah/{var/lib/tomcat8/webapps => srv}/sigmah/WEB-INF/classes/META-INF/persistence.xml (100%) rename sigmah/{var/lib/tomcat8/webapps => srv}/sigmah/WEB-INF/classes/sigmah.properties (100%) diff --git a/sigmah.sh b/sigmah.sh index 1d4ab44..244b14e 100755 --- a/sigmah.sh +++ b/sigmah.sh @@ -7,7 +7,7 @@ apt-get -y --no-install-recommends install python-bcrypt # Download Sigmah wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-2.0.2.war -O /tmp/sigmah.war -unzip /tmp/sigmah.war -d /var/lib/tomcat8/webapps/sigmah +unzip /tmp/sigmah.war -d /srv/sigmah rm -f /tmp/sigmah.war # Create database @@ -19,9 +19,10 @@ rm -f /tmp/sigmah-createdb.sql # Configure Sigmah mkdir -p /srv/sigmah/{files,archives} chown -R tomcat8:tomcat8 /srv/sigmah -envsubst <${SOURCE_DIR}/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml >/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml -cp ${SOURCE_DIR}/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties /var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties -cp /var/lib/tomcat8/webapps/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/files/logo.png +ln -s /srv/sigmah /var/lib/tomcat8/webapps/sigmah +envsubst <${SOURCE_DIR}/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml >/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml +cp ${SOURCE_DIR}/srv/sigmah/WEB-INF/classes/sigmah.properties /srv/sigmah/WEB-INF/classes/sigmah.properties +cp /srv/sigmah/sigmah/images/header/org-default-logo.png /srv/sigmah/files/logo.png # Populate database wget https://github.com/sigmah-dev/sigmah/releases/download/v2.0.2/sigmah-MinimumDataKit-2.0.postgresql.sql -O /tmp/sigmah-MinimumDataKit.sql diff --git a/sigmah/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml b/sigmah/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml similarity index 100% rename from sigmah/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml rename to sigmah/srv/sigmah/WEB-INF/classes/META-INF/persistence.xml diff --git a/sigmah/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties b/sigmah/srv/sigmah/WEB-INF/classes/sigmah.properties similarity index 100% rename from sigmah/var/lib/tomcat8/webapps/sigmah/WEB-INF/classes/sigmah.properties rename to sigmah/srv/sigmah/WEB-INF/classes/sigmah.properties