Bug 283445 - www/onlyoffice-documentserver wrong path in /usr/local/bin/documentserver-flush-cache.sh
Summary: www/onlyoffice-documentserver wrong path in /usr/local/bin/documentserver-flu...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-20 16:40 UTC by freebsd.org
Modified: 2025-01-09 16:09 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mikael)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd.org 2024-12-20 16:40:23 UTC
The script /usr/local/bin/documentserver-flush-cache.sh tries to create a file in line 27:

```
# Save the hash to a variable in the configuration file
echo "set \$cache_tag \"$HASH\";" > /usr/local/etc/onlyoffice/etc/nginx/includes/ds-cache.conf
```

Running the script fails:

```
# /usr/local/bin/documentserver-flush-cache.sh
/usr/local/bin/documentserver-flush-cache.sh: cannot create /usr/local/etc/onlyoffice/etc/nginx/includes/ds-cache.conf: No such file or directory
```

This path does not exist. Instead, there is:

/usr/local/etc/onlyoffice/documentserver/nginx/includes/

Changing line 27 to this path remedies this error.

This is related to nginx errors

```
# service  nginx start
Performing sanity check on nginx configuration:
nginx: [emerg] unknown "cache_tag" variable
nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Starting nginx.
nginx: [emerg] unknown "cache_tag" variable
/usr/local/etc/rc.d/nginx: WARNING: failed to start nginx
```

The above script is run automatically on documentserver startup, but when it fails the tag is never declared and nginx fails, too.
Comment 1 commit-hook freebsd_committer freebsd_triage 2025-01-09 16:08:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6c76f28cc80e62193c5bbb5bf4f4c2c6c6061e5d

commit 6c76f28cc80e62193c5bbb5bf4f4c2c6c6061e5d
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-01-09 15:16:22 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-01-09 16:07:44 +0000

    www/onlyoffice-documentserver: Fix ds-cache.conf path

    PR:             283445

 www/onlyoffice-documentserver/Makefile                                  | 2 +-
 ...r-package_common_documentserver_bin_documentserver-flush-cache.sh.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2025-01-09 16:09:47 UTC
Thanks!