Add SeedDMS admin password generator
This commit is contained in:
parent
f9759f3fcc
commit
5614f66a1a
@ -18,11 +18,16 @@ sudo -u postgres psql -f /tmp/seeddms-createdb.sql
|
|||||||
rm -f /tmp/seeddms-createdb.sql
|
rm -f /tmp/seeddms-createdb.sql
|
||||||
export PGPASSWORD=${SEEDDMS_PWD}
|
export PGPASSWORD=${SEEDDMS_PWD}
|
||||||
psql -f /srv/seeddms/www/install/create_tables-postgres.sql seeddms seeddms
|
psql -f /srv/seeddms/www/install/create_tables-postgres.sql seeddms seeddms
|
||||||
unset PGPASSWORD
|
|
||||||
|
|
||||||
# Configure SeedDMS
|
# Configure SeedDMS
|
||||||
envsubst <${SOURCE_DIR}/seeddms/srv/seeddms/www/conf/settings.xml >/srv/seeddms/www/conf/settings.xml
|
envsubst <${SOURCE_DIR}/seeddms/srv/seeddms/www/conf/settings.xml >/srv/seeddms/www/conf/settings.xml
|
||||||
rm -rf /srv/seeddms/www/install/
|
rm -rf /srv/seeddms/www/install/
|
||||||
|
export SEEDDMS_ADMIN_USER=admin
|
||||||
|
export SEEDDMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||||
|
export SEEDDMS_ADMIN_EMAIL=admin@example.com
|
||||||
|
envsubst <${SOURCE_DIR}/seeddms/tmp/seeddms-adminpwd.sql >/tmp/seeddms-adminpwd.sql
|
||||||
|
psql -f /tmp/seeddms-adminpwd.sql seeddms seeddms
|
||||||
|
unset PGPASSWORD
|
||||||
|
|
||||||
# Create OS user
|
# Create OS user
|
||||||
adduser --system --group --home /srv/seeddms --shell /bin/false seeddms
|
adduser --system --group --home /srv/seeddms --shell /bin/false seeddms
|
||||||
@ -38,7 +43,7 @@ systemctl restart php7.0-fpm
|
|||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
|
||||||
# Add portal application definition
|
# Add portal application definition
|
||||||
${SOURCE_DIR}/basic/portal-app-manager.py seeddms "https://{host}/seeddms/"
|
${SOURCE_DIR}/basic/portal-app-manager.py seeddms "https://{host}/seeddms/" "${SEEDDMS_ADMIN_USER}" "${SEEDDMS_ADMIN_PWD}"
|
||||||
|
|
||||||
# TODO: id3 ssconvers pdftotext catdoc
|
# TODO: id3 ssconvers pdftotext catdoc
|
||||||
# TODO: Test Lucene fulltext search
|
# TODO: Test Lucene fulltext search
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<system>
|
<system>
|
||||||
<server rootDir="/srv/seeddms/www/" httpRoot="/seeddms/" contentDir="/srv/seeddms/data/" stagingDir="/srv/seeddms/data/staging/" luceneDir="/srv/seeddms/data/lucene/" logFileEnable="true" logFileRotation="d" enableLargeFileUpload="true" partitionSize="2000000" dropFolderDir="" cacheDir="/srv/seeddms/data/cache/" maxUploadSize="" />
|
<server rootDir="/srv/seeddms/www/" httpRoot="/seeddms/" contentDir="/srv/seeddms/data/" stagingDir="/srv/seeddms/data/staging/" luceneDir="/srv/seeddms/data/lucene/" logFileEnable="true" logFileRotation="d" enableLargeFileUpload="true" partitionSize="2000000" dropFolderDir="" cacheDir="/srv/seeddms/data/cache/" maxUploadSize="" />
|
||||||
<authentication enableGuestLogin="false" enablePasswordForgotten="false" restricted="true" enableUserImage="false" disableSelfEdit="false" passwordStrength="0" passwordExpiration="0" passwordHistory="0" passwordStrengthAlgorithm="simple" loginFailure="0" encryptionKey="" enableGuestAutoLogin="false" autoLoginUser="0" quota="0" undelUserIds="" cookieLifetime="0" defaultAccessDocs="0">
|
<authentication enableGuestLogin="false" enablePasswordForgotten="false" restricted="true" enableUserImage="false" disableSelfEdit="false" passwordStrength="0" passwordExpiration="0" passwordHistory="0" passwordStrengthAlgorithm="simple" loginFailure="0" encryptionKey="" enableGuestAutoLogin="false" autoLoginUser="0" quota="0" undelUserIds="" cookieLifetime="0" defaultAccessDocs="0">
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector enable="false" type="ldap" host="ldaps://ldap.host.com" port="389" baseDN="" bindDN="" bindPw="" filter="" />
|
<connector enable="false" type="ldap" host="ldaps://ldap.host.com" port="389" baseDN="" bindDN="" bindPw="" filter="" />
|
||||||
<connector enable="false" type="AD" host="ldap.example.com" port="389" baseDN="" accountDomainName="example.com" bindDN="" bindPw="" />
|
<connector enable="false" type="AD" host="ldap.example.com" port="389" baseDN="" accountDomainName="example.com" bindDN="" bindPw="" />
|
||||||
</connectors>
|
</connectors>
|
||||||
</authentication>
|
</authentication>
|
||||||
<database dbDriver="pgsql" dbHostname="localhost" dbDatabase="seeddms" dbUser="seeddms" dbPass="${SEEDDMS_PWD}" doNotCheckVersion="false" />
|
<database dbDriver="pgsql" dbHostname="localhost" dbDatabase="seeddms" dbUser="seeddms" dbPass="${SEEDDMS_PWD}" doNotCheckVersion="false" />
|
||||||
<smtp smtpServer="localhost" smtpPort="25" smtpSendFrom="seeddms@localhost" smtpUser="" smtpPassword="" />
|
<smtp smtpServer="localhost" smtpPort="25" smtpSendFrom="seeddms@localhost" smtpUser="" smtpPassword="" />
|
||||||
@ -23,12 +23,12 @@
|
|||||||
<notification enableNotificationAppRev="true" enableOwnerNotification="false" enableNotificationWorkflow="false" />
|
<notification enableNotificationAppRev="true" enableOwnerNotification="false" enableNotificationWorkflow="false" />
|
||||||
<server coreDir="" luceneClassDir="" contentOffsetDir="1048576" maxDirID="0" updateNotifyTime="86400" extraPath="/srv/seeddms/pear" cmdTimeout="5" maxExecutionTime="30" />
|
<server coreDir="" luceneClassDir="" contentOffsetDir="1048576" maxDirID="0" updateNotifyTime="86400" extraPath="/srv/seeddms/pear" cmdTimeout="5" maxExecutionTime="30" />
|
||||||
<converters target="fulltext">
|
<converters target="fulltext">
|
||||||
<converter mimeType="application/pdf">pdftotext -enc UTF-8 -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'</converter>
|
<converter mimeType="application/pdf">pdftotext -enc UTF-8 -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'</converter>
|
||||||
<converter mimeType="application/msword">catdoc %s</converter>
|
<converter mimeType="application/msword">catdoc %s</converter>
|
||||||
<converter mimeType="application/vnd.ms-excel">ssconvert -T Gnumeric_stf:stf_csv -S %s fd://1</converter>
|
<converter mimeType="application/vnd.ms-excel">ssconvert -T Gnumeric_stf:stf_csv -S %s fd://1</converter>
|
||||||
<converter mimeType="audio/mp3">id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'</converter>
|
<converter mimeType="audio/mp3">id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'</converter>
|
||||||
<converter mimeType="audio/mpeg">id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'</converter>
|
<converter mimeType="audio/mpeg">id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'</converter>
|
||||||
<converter mimeType="text/plain">cat %s</converter>
|
<converter mimeType="text/plain">cat %s</converter>
|
||||||
</converters>
|
</converters>
|
||||||
</advanced>
|
</advanced>
|
||||||
<extensions />
|
<extensions />
|
||||||
|
1
seeddms/tmp/seeddms-adminpwd.sql
Normal file
1
seeddms/tmp/seeddms-adminpwd.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
UPDATE "tblUsers" SET login = '${SEEDDMS_ADMIN_USER}', pwd = MD5('${SEEDDMS_ADMIN_PWD}'), email = '${SEEDDMS_ADMIN_EMAIL}' WHERE login = 'admin';
|
Loading…
Reference in New Issue
Block a user