1
0
mirror of https://github.com/nokonoko/Uguu.git synced 2024-01-06 13:35:15 +00:00
This commit is contained in:
nokonoko 2020-11-18 13:04:23 +01:00
parent 63cfe4f682
commit 3ffab18a49
3 changed files with 11 additions and 0 deletions

View File

@ -69,6 +69,14 @@ increase POST size limits in `php.ini` and webserver configuration. For PHP,
modify `upload_max_filesize` and `post_max_size` values. The configuration
option for nginx webserver is `client_max_body_size`.
Edit checkdb.sh and checkfiles.sh to the proper paths then add them to your crontab:
```bash
0,30 * * * * bash /path/to/checkfiles.sh
0,30 * * * * bash /path/to/checkdb.sh
```
These scripts check if DB entries and files are older then 24 hours and if they are deletes them.
Example nginx configs can be found in confs/.
## Using SQLite as DB engine

1
checkdb.sh Normal file
View File

@ -0,0 +1 @@
sqlite3 /path/to/db/uguu.sq3 "DELETE FROM files WHERE date <= strftime('%s', datetime('now', '-1 day'));"

2
checkfiles.sh Normal file
View File

@ -0,0 +1,2 @@
#! /bin/sh
find /path/to/files/ -mmin +1440 -exec rm -f {} \;