add possibility to install zotero without SSL
add CACert root certificate when needed add option to either generate or use custom SSL certificates patch AWS-SDK to use custom S3 serversmaster
parent
6b3d67b731
commit
ba05694f4d
|
@ -65,13 +65,13 @@ echo "remove composer"
|
||||||
rm composer.phar
|
rm composer.phar
|
||||||
|
|
||||||
echo "install add_user script"
|
echo "install add_user script"
|
||||||
cp /root/add_user /srv/zotero/dataserver/admin
|
cp $cur_dir/add_user /srv/zotero/dataserver/admin
|
||||||
|
|
||||||
echo "install change_password script"
|
echo "install change_password script"
|
||||||
cp /root/change_password /srv/zotero/dataserver/admin
|
cp $cur_dir/change_password /srv/zotero/dataserver/admin
|
||||||
|
|
||||||
echo "patch master.sql"
|
echo "patch master.sql"
|
||||||
cp /root/master.sql /srv/zotero/dataserver/misc
|
cp $cur_dir/master.sql /srv/zotero/dataserver/misc
|
||||||
|
|
||||||
echo "prepare directory rights"
|
echo "prepare directory rights"
|
||||||
chown www-data:www-data /srv/zotero/dataserver/tmp
|
chown www-data:www-data /srv/zotero/dataserver/tmp
|
||||||
|
@ -81,16 +81,35 @@ cd /srv/zotero/dataserver/include
|
||||||
rm -r Zend
|
rm -r Zend
|
||||||
ln -s /usr/share/php/Zend/
|
ln -s /usr/share/php/Zend/
|
||||||
|
|
||||||
|
read -p "Do you want to use SSL certificates for Zotero server? (y/n)" SSL
|
||||||
|
if [[ $SSL = y ]] ;
|
||||||
|
then
|
||||||
|
read -p "Do you want to generate SSL certificates now? (y/n)" gen_SSL
|
||||||
|
if [[ $gen_SSL = y ]];
|
||||||
|
then
|
||||||
echo "generate SSL key and cert"
|
echo "generate SSL key and cert"
|
||||||
certtool -p --sec-param high --outfile /etc/apache2/zotero.key
|
certtool -p --sec-param high --outfile /etc/apache2/zotero.key
|
||||||
certtool -s --load-privkey /etc/apache2/zotero.key --outfile /etc/apache2/zotero.cert
|
certtool -s --load-privkey /etc/apache2/zotero.key --outfile /etc/apache2/zotero.cert
|
||||||
|
else
|
||||||
|
cp $cur_dir/zotero.key /etc/apache2/zotero.key
|
||||||
|
cp $cur_dir/zotero.cert /etc/apache2/zotero.cert
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "enable ssl support for apache2 server"
|
read -p "Do you want to use SSL certificates for LibreS3? (y/n)" SSL_LibreS3
|
||||||
a2enmod ssl
|
if [[ $SSL_LibreS3 = y ]] ;
|
||||||
|
then
|
||||||
|
cat $cur_dir/sx.cert >> /srv/zotero/dataserver/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
|
||||||
|
fi
|
||||||
|
|
||||||
echo "enable rewrite support for apache2 server"
|
echo "enable rewrite support for apache2 server"
|
||||||
a2enmod rewrite
|
a2enmod rewrite
|
||||||
|
|
||||||
|
if [[ $SSL = y ]] ;
|
||||||
|
then
|
||||||
|
echo "enable ssl support for apache2 server"
|
||||||
|
a2enmod ssl
|
||||||
|
|
||||||
echo "create available site for zotero"
|
echo "create available site for zotero"
|
||||||
echo "<VirtualHost *:443>
|
echo "<VirtualHost *:443>
|
||||||
DocumentRoot /srv/zotero/dataserver/htdocs
|
DocumentRoot /srv/zotero/dataserver/htdocs
|
||||||
|
@ -108,7 +127,23 @@ echo "<VirtualHost *:443>
|
||||||
ErrorLog /srv/zotero/error.log
|
ErrorLog /srv/zotero/error.log
|
||||||
CustomLog /srv/zotero/access.log common
|
CustomLog /srv/zotero/access.log common
|
||||||
</VirtualHost>" > /etc/apache2/sites-available/zotero
|
</VirtualHost>" > /etc/apache2/sites-available/zotero
|
||||||
|
else
|
||||||
|
echo "create available site for zotero"
|
||||||
|
echo "<VirtualHost *:80>
|
||||||
|
DocumentRoot /srv/zotero/dataserver/htdocs
|
||||||
|
|
||||||
|
<Directory "/srv/zotero/dataserver/htdocs/">
|
||||||
|
Options FollowSymLinks MultiViews
|
||||||
|
AllowOverride All
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /srv/zotero/error.log
|
||||||
|
CustomLog /srv/zotero/access.log common
|
||||||
|
</VirtualHost>" > /etc/apache2/sites-available/zotero
|
||||||
|
|
||||||
|
fi
|
||||||
echo "activate site for zotero"
|
echo "activate site for zotero"
|
||||||
a2ensite zotero
|
a2ensite zotero
|
||||||
|
|
||||||
|
@ -265,7 +300,7 @@ echo "#####################################"
|
||||||
echo "patch AWS-SDK to use custom S3 server"
|
echo "patch AWS-SDK to use custom S3 server"
|
||||||
echo "#####################################"
|
echo "#####################################"
|
||||||
|
|
||||||
sed -i "s,{service}.{region}.amazonaws.com,s3.drossenhausen.de.vu" /srv/zotero/dataserver/vendor/
|
sed -i "s,{service}.{region}.amazonaws.com,s3.drossenhausen.de.vu" /srv/zotero/dataserver/vendor/aws/aws-sdk-php/src/Aws/Common/Resources/public-endpoints.php
|
||||||
|
|
||||||
echo "###############"
|
echo "###############"
|
||||||
echo "Configure runit"
|
echo "Configure runit"
|
||||||
|
|
Loading…
Reference in New Issue