Compare commits

...

5 commits

Author SHA1 Message Date
RipleyBooya
ef9f32941c
Update README.md 2025-11-23 14:01:59 +01:00
RipleyBooya
e1d727456d
Create onlyoffice-auto-fix 2025-11-23 12:41:09 +01:00
RipleyBooya
5cd02fbaa3
Create onlyoffice-fix.timer 2025-11-23 12:40:44 +01:00
RipleyBooya
a41cedb184
Create onlyoffice-fix.service 2025-11-23 12:40:16 +01:00
RipleyBooya
422ba72e7c
Create onlyoffice-auto-fix.sh 2025-11-23 12:39:43 +01:00
5 changed files with 75 additions and 3 deletions

View file

@ -50,10 +50,21 @@ This document proposes a complete, reliable, automated workaround.
## Summary of the Solution
### 0. (Optional) Set “Availability check interval” to **0 minutes**
In the ONLYOFFICE admin panel:
**Settings → ONLYOFFICE → Availability check interval → set to `0`**
### 0. (Optional) Set “editors_check_interval” to **0** via OCC
There is no GUI option anymore for this in the ONLYOFFICE admin panel,
so you have to use the CLI (occ) inside the Nextcloud container:
```bash
docker exec -it nextcloud-aio-nextcloud \
sudo -E -u www-data php occ config:system:set onlyoffice editors_check_interval --value=0
docker exec -it nextcloud-aio-nextcloud \
sudo -E -u www-data php occ config:system:get onlyoffice editors_check_interval
```
This reduces periodic background checks,
**BUT on its own it does *not* fix the nightly-backup issue.**

View file

@ -0,0 +1,10 @@
/var/log/onlyoffice-auto-fix.log {
daily
rotate 90
size 5M
missingok
notifempty
compress
delaycompress
copytruncate
}

View file

@ -0,0 +1,7 @@
[Unit]
Description=Auto-fix OnlyOffice for Nextcloud AIO
After=docker.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/onlyoffice-auto-fix.sh

View file

@ -0,0 +1,14 @@
[Unit]
Description=Run OnlyOffice auto-fix after Nextcloud AIO backup
[Timer]
# Primary window: every 5 minutes between 04:1004:40 UTC
OnCalendar=*-*-* 04:10:00..04:40:00/5 UTC
# Safety run: once per hour at minute 10 (UTC)
OnCalendar=*-*-* *:10:00 UTC
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,30 @@
#!/bin/bash
LOCK="/tmp/onlyoffice-check.lock"
LOG="/var/log/onlyoffice-auto-fix.log"
if [ -f "$LOCK" ]; then
echo "$(date '+%F %T') : lock present, skipping" >> "$LOG"
exit 0
fi
touch "$LOCK"
{
echo " "
echo "===== $(date '+%F %T') : Running OnlyOffice check ====="
docker exec nextcloud-aio-nextcloud \
sudo -E -u www-data php occ onlyoffice:documentserver --check
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "$(date '+%F %T') : OK ✓"
else
echo "$(date '+%F %T') : ERROR DocumentServer not ready ❌"
fi
} >> "$LOG" 2>&1
rm -f "$LOCK"