/[smecontribs]/rpms/smeserver-onlyoffice/contribs10/smeserver-onlyoffice-0.0.5-bz12317.patch
ViewVC logotype

Contents of /rpms/smeserver-onlyoffice/contribs10/smeserver-onlyoffice-0.0.5-bz12317.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Feb 7 06:55:24 2023 UTC (21 months, 3 weeks ago) by jpp
Branch: MAIN
CVS Tags: smeserver-onlyoffice-0_0_5-8_el7_sme, smeserver-onlyoffice-0_0_5-6_el7_sme, smeserver-onlyoffice-0_0_5-7_el7_sme, HEAD
* Tue Feb 07 2023 Jean-Philippe Pialasse <tests@pialasse.com> 0.0.5-6.sme
- requires documentserver < 7.3 as using supervisord
- fix path to pgsql [SME: 12317]
- redirect to welcome uri

1 diff -Nur --no-dereference smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf smeserver-onlyoffice-0.0.5/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf
2 --- smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf 2023-02-07 00:32:01.841000000 -0500
3 +++ smeserver-onlyoffice-0.0.5/root/etc/e-smith/events/actions/smeserver-onlyoffice-conf 2023-02-07 01:36:46.917000000 -0500
4 @@ -40,16 +40,17 @@
5 PGUSER=`/sbin/e-smith/config getprop onlyoffice dbuser || echo 'onlyoffice'`
6 PGNAME=`/sbin/e-smith/config getprop onlyoffice dbname || echo 'onlyoffice'`
7 CONNECTION_PARAMS="-hlocalhost -U$PGUSER -w"
8 -PSQL="psql -q $CONNECTION_PARAMS"
9 +psql="/usr/pgsql-13/bin/psql"
10 +PSQL="$psql -q $CONNECTION_PARAMS"
11 CREATEDB="createdb -q $CONNECTION_PARAMS"
12
13 -su - postgres -c "psql -lqt | cut -d \| -f 1 | grep -q -w $PGNAME"
14 +su - postgres -c "$psql -lqt | cut -d \| -f 1 | grep -q -w $PGNAME"
15 if [ $? -eq 1 ]; then # database do not exists
16 - su - postgres -c "psql -c \"CREATE DATABASE $PGNAME;\""
17 - su - postgres -c "psql -c \"CREATE USER $PGUSER WITH password '$PGPASSWORD';\""
18 - su - postgres -c "psql -c \"GRANT ALL privileges ON DATABASE $PGNAME TO $PGUSER;\""
19 + su - postgres -c "$psql -c \"CREATE DATABASE $PGNAME;\""
20 + su - postgres -c "$psql -c \"CREATE USER $PGUSER WITH password '$PGPASSWORD';\""
21 + su - postgres -c "$psql -c \"GRANT ALL privileges ON DATABASE $PGNAME TO $PGUSER;\""
22 else
23 - su - postgres -c "psql -c \"ALTER USER $PGUSER WITH password '$PGPASSWORD';\""
24 + su - postgres -c "$psql -c \"ALTER USER $PGUSER WITH password '$PGPASSWORD';\""
25 fi
26
27 # check if db works correctly
28 @@ -115,9 +116,9 @@
29 fi
30
31 # check if webtop5 db is present to add onlyoffice config and restart webtop
32 -su - postgres -c "psql -lqt | cut -d \| -f 1 | grep -q -w webtop5"
33 +su - postgres -c "$psql -lqt | cut -d \| -f 1 | grep -q -w webtop5"
34 if [ $? -eq 0 ]; then
35 - su - postgres -c "psql webtop5" <<EOF
36 + su - postgres -c "$psql webtop5" <<EOF
37 INSERT INTO core.settings(service_id, key, value)
38 SELECT 'com.sonicle.webtop.core', 'documentserver.secret.in', '$JWT_SECRET'
39 WHERE NOT EXISTS (
40 diff -Nur --no-dereference smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Onlyoffice/80VirtualHostOnlyoffice smeserver-onlyoffice-0.0.5/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Onlyoffice/80VirtualHostOnlyoffice
41 --- smeserver-onlyoffice-0.0.5.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Onlyoffice/80VirtualHostOnlyoffice 2023-02-07 00:32:01.835000000 -0500
42 +++ smeserver-onlyoffice-0.0.5/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Onlyoffice/80VirtualHostOnlyoffice 2023-02-07 01:41:42.087000000 -0500
43 @@ -36,6 +36,9 @@
44 $OUT .= " SSLCertificateKeyFile $ssl_file_key\n" unless ( $ssl_file_key eq 'disabled' || ! -e $ssl_file_chain );
45
46 $OUT .= <<_EOL;
47 + RewriteEngine on
48 + RewriteRule ^(/)?\$ /welcome/ [NC,R,L]
49 +
50 SetEnvIf Host "^(.*)\$" THE_HOST=\$1
51 #needs apache 2.4.7
52 #RequestHeader setifempty X-Forwarded-Proto https

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed