diff --git a/10-seeddms.sh b/10-seeddms.sh
index 94bd4e1..5663f99 100644
--- a/10-seeddms.sh
+++ b/10-seeddms.sh
@@ -6,33 +6,23 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))
apt-get -y --no-install-recommends install php7.0-gd php7.0-fpm php7.0-mbstring php7.0-pgsql php7.0-xml php-log php-mail php-pear
# Install SeedDMS
-git clone https://git.code.sf.net/p/seeddms/code /srv/seeddms
-git -C /srv/seeddms checkout seeddms-5.1.x
-rm -rf /srv/seeddms/.git
+wget https://sourceforge.net/projects/seeddms/files/seeddms-5.1.3/seeddms-quickstart-5.1.3.tar.gz/download -O /srv/seeddms.tgz
+tar xzf /srv/seeddms.tgz -C /srv
+mv /srv/seeddms51x /srv/seeddms
+rm -f /srv/seeddms.tgz
# Populate database
export SEEDDMS_PWD=$(head -c 260 /dev/urandom | tr -cd '[:alnum:]' | head -c 26)
-envsubst <${SOURCE_DIR}/seeddms/tmp/createdb-seeddms.sql >/tmp/createdb-seeddms.sql
-sudo -u postgres psql -f /tmp/createdb-seeddms.sql
-rm -f /tmp/createdb-seeddms.sql
+envsubst <${SOURCE_DIR}/seeddms/tmp/seeddms-createdb.sql >/tmp/seeddms-createdb.sql
+sudo -u postgres psql -f /tmp/seeddms-createdb.sql
+rm -f /tmp/seeddms-createdb.sql
export PGPASSWORD=${SEEDDMS_PWD}
-psql -f /srv/seeddms/install/create_tables-postgres.sql seeddms seeddms
+psql -f /srv/seeddms/www/install/create_tables-postgres.sql seeddms seeddms
unset PGPASSWORD
# Configure SeedDMS
envsubst <${SOURCE_DIR}/seeddms/srv/seeddms/conf/settings.xml >/srv/seeddms/conf/settings.xml
-
-# Adjust directory structure
-mkdir -p /srv/seeddms/data/{lucene,staging,cache}
-mkdir /srv/seeddms/SeedDMS
-mv /srv/seeddms/SeedDMS_Core/Core* /srv/seeddms/SeedDMS/
-mv /srv/seeddms/SeedDMS_Lucene/Lucene* /srv/seeddms/SeedDMS/
-mv /srv/seeddms/SeedDMS_Preview/Preview* /srv/seeddms/SeedDMS/
-mv /srv/seeddms/SeedDMS_SQLiteFTS/SQLiteFTS* /srv/seeddms/SeedDMS/
-
-rm -rf /srv/seeddms/SeedDMS_*
-rm -rf /srv/seeddms/install/
-rm -rf /srv/seeddms/ext/example/
+rm -rf /srv/seeddms/www/install/
chown -R www-data:www-data /srv/seeddms/
diff --git a/seeddms/etc/nginx/apps-available/seeddms b/seeddms/etc/nginx/apps-available/seeddms
index 9228872..ec2a18b 100644
--- a/seeddms/etc/nginx/apps-available/seeddms
+++ b/seeddms/etc/nginx/apps-available/seeddms
@@ -1,10 +1,10 @@
location /seeddms {
- root /srv;
+ alias /srv/seeddms/www;
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
- fastcgi_param HTTP_PROXY "";
+ fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
diff --git a/seeddms/srv/seeddms/conf/settings.xml b/seeddms/srv/seeddms/www/conf/settings.xml
similarity index 86%
rename from seeddms/srv/seeddms/conf/settings.xml
rename to seeddms/srv/seeddms/www/conf/settings.xml
index fac5cfb..444c698 100644
--- a/seeddms/srv/seeddms/conf/settings.xml
+++ b/seeddms/srv/seeddms/www/conf/settings.xml
@@ -6,7 +6,7 @@
-
+
@@ -21,7 +21,7 @@
-
+
pdftotext -enc UTF-8 -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'
catdoc %s