Skip to content

Commit

Permalink
Fix #71: OnlyOffice 6.3.0 snap wont work with NC 21 + OO 7.0.2 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
romandemidov authored Jun 1, 2021
1 parent ac3e574 commit a8fe015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions snap/hooks/post-refresh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

mv $SNAP_DATA/etc/onlyoffice/documentserver/local.json $SNAP_DATA
rm -R $SNAP_DATA/etc
rm -R $SNAP_DATA/mysql
mv $SNAP_DATA/var/www/onlyoffice/Data/certs $SNAP_DATA
Expand All @@ -14,5 +15,6 @@ if [ -d $SNAP_DATA/files ]; then
mv $SNAP_DATA/files $SNAP_DATA/var/lib/onlyoffice/documentserver-example
fi
cp -R $SNAP/etc $SNAP_DATA/
mv $SNAP_DATA/local.json $SNAP_DATA/etc/onlyoffice/documentserver/

$SNAP/usr/sbin/generate-all-fonts.sh
2 changes: 1 addition & 1 deletion src/mysql/bin/start_mysql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ $new_install = true ]; then
printf "Generating onlyoffice mysql password... "
onlyoffice_password="$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c64)"
# Save onlyoffice user password
sed -i -e "s#dbPass\": \"onlyoffice#dbPass\": \"${onlyoffice_password}#g" $SNAP_DATA/etc/onlyoffice/documentserver/local.json
sed -i -e "s#dbPass\": \"\([0-9A-Za-z_-]\+\)#dbPass\": \"${onlyoffice_password}#g" $SNAP_DATA/etc/onlyoffice/documentserver/local.json
printf "done\n"

# Save root user information
Expand Down

0 comments on commit a8fe015

Please sign in to comment.