view imgpasterd-clean.8.in @ 0:f41e1b48510d

misc: initial import
author David Demelier <markand@malikania.fr>
date Wed, 25 Nov 2020 21:13:03 +0100
parents
children
line wrap: on
line source

.\"
.\" Copyright (c) 2020 David Demelier <markand@malikania.fr>
.\"
.\" Permission to use, copy, modify, and/or distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd 06 February, 2020
.Dt IMGPASTERD-CLEAN 8
.Os
.\" NAME
.Sh NAME
.Nm imgpasterd-clean
.Nd simple image hosting service cleaner
.\" SYNOPSIS
.Sh SYNOPSIS
.Nm
.Op Fl d Ar database-path
.\" DESCRIPTION
.Sh DESCRIPTION
This utility should be used at periodic intervals to clean up the SQLite
database. It will remove deprecated images.
.Pp
Like
.Xr imgpasterd 8
it can use environment variables or option to specify the database.
.Pp
Available options:
.Bl -tag -width Ds
.It Fl d Ar database-path
Specify an alternate path for the database.
.El
.\" USAGE
.Sh USAGE
This command should be placed in a cron job (or equivalent) at periodic
intervals. Since the minimal lifetime for an image is one hour a periodic job
every hour seems appropriate.
.Pp
Note: make sure to run the cron job in the same user as the pasterd service,
otherwise you may change file permissions.
.Pp
Example of cron job:
.Bd -literal -offset Ds
0 * * * * www imgpasterd-clean -d /var/paster/paster.db
.Ed
.\" ENVIRONMENT
.Sh ENVIRONMENT
The following environment variables are detected:
.Bl -tag -width Ds
.It Va IMGPASTERD_DATABASE_PATH No (string)
Path to the SQLite database.
.El
.\" AUTHORS
.Sh AUTHORS
.Nm
was written by David Demelier <markand@malikania.fr>
.\" SEE ALSO
.Sh SEE ALSO
.Xr imgpasterd 8