mirror of
https://github.com/ZizzyDizzyMC/linx-server.git
synced 2026-01-23 02:14:33 +00:00
Delete linx-cleanup directory
This commit is contained in:
parent
c8f7c32649
commit
b764eae9cf
4 changed files with 0 additions and 65 deletions
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
linx-cleanup
|
||||
-------------------------
|
||||
When files expire, access is disabled immediately, but the files and metadata
|
||||
will persist on disk until someone attempts to access them.
|
||||
|
||||
If you'd like to automatically clean up files that have expired, you can use the included `linx-cleanup` utility. To run it automatically, use a cronjob or similar type
|
||||
of scheduled task.
|
||||
|
||||
You should be careful to ensure that only one instance of `linx-cleanup` runs at
|
||||
a time to avoid unexpected behavior. It does not implement any type of locking.
|
||||
|
||||
|
||||
|Option|Description
|
||||
|------|-----------
|
||||
| ```-filespath files/``` | Path to stored uploads (default is files/)
|
||||
| ```-nologs``` | (optionally) disable deletion logs in stdout
|
||||
| ```-metapath meta/``` | Path to stored information about uploads (default is meta/)
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
|
||||
"github.com/andreimarcu/linx-server/cleanup"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var filesDir string
|
||||
var metaDir string
|
||||
var locksDir string
|
||||
var noLogs bool
|
||||
|
||||
flag.StringVar(&filesDir, "filespath", "files/",
|
||||
"path to files directory")
|
||||
flag.StringVar(&metaDir, "metapath", "meta/",
|
||||
"path to metadata directory")
|
||||
flag.StringVar(&locksDir, "lockspath", "locks/",
|
||||
"path to locks directory")
|
||||
flag.BoolVar(&noLogs, "nologs", false,
|
||||
"don't log deleted files")
|
||||
flag.Parse()
|
||||
|
||||
cleanup.Cleanup(filesDir, metaDir, locksDir, noLogs)
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
[Unit]
|
||||
Description=Self-hosted file/code/media sharing (expired files cleanup)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=linx
|
||||
Group=linx
|
||||
ExecStart=/usr/bin/linx-cleanup
|
||||
WorkingDirectory=/srv/linx/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[Unit]
|
||||
Description=Run linx-cleanup every hour
|
||||
|
||||
[Timer]
|
||||
OnUnitActiveSec=1h
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue