diff --git a/linx-cleanup/README.md b/linx-cleanup/README.md deleted file mode 100644 index 7d4f4a3..0000000 --- a/linx-cleanup/README.md +++ /dev/null @@ -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/) - diff --git a/linx-cleanup/linx-cleanup.go b/linx-cleanup/linx-cleanup.go deleted file mode 100644 index 08d8363..0000000 --- a/linx-cleanup/linx-cleanup.go +++ /dev/null @@ -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) -} diff --git a/linx-cleanup/linx-cleanup.service b/linx-cleanup/linx-cleanup.service deleted file mode 100644 index 7a03941..0000000 --- a/linx-cleanup/linx-cleanup.service +++ /dev/null @@ -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 diff --git a/linx-cleanup/linx-cleanup.timer b/linx-cleanup/linx-cleanup.timer deleted file mode 100644 index 40d8cda..0000000 --- a/linx-cleanup/linx-cleanup.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Run linx-cleanup every hour - -[Timer] -OnUnitActiveSec=1h - -[Install] -WantedBy=timers.target