.. | ||
cron | ||
delete-upload | ||
deny-file | ||
migrate | ||
migrate-override-toggle | ||
new-migration | ||
nuke-file | ||
README.md |
EEPROM Tools
Below a short description of every script in this directory, what it does and what arguments it takes, etc.
cron
Usage: cron
This script performs scheduled maintenance, primarily cleaning up orphaned records and executing other rule stuff.
It accepts no arguments BUT you should be running the script as the same user as the webserver/PHP FPM to ensure that you won't run into permission issues.
delete-upload
Usage: delete-upload [OPTION]... [UPLOAD]
This script deletes a single upload and all of its variants from the database. It also attempts to purge the associated files, but that can only be done if they're not used by other uploads.
This tool accepts one option -s
/--base62
which causes [UPLOAD]
to be interpreted as a base62 number to make administration easier.
Make sure to remove the trailing four secret characters when copying from a URL!
deny-file
Usage: deny-file [OPTION]... [FILE]
Prevents a file from being uploaded in the future and marks the existing copy for removal.
This tool accepts three options:
-r
/--reason=REASON
: Required!!! Reason for denying the file. Currently supportscopyright
,rules
andother
.-h
/--hash
: Treat the provided ID as a SHA256 hash, can be hex, URI-safe base64 or raw if you're feeling feisty.-s
/--base62
: Interpret provided ID as a base62 number.-u
/--upload
: Interpret provided ID as an upload ID instead of a file ID.
migrate
Usage: migrate
Runs database migrations, part of the Index framework.
Does not take any arguments but does write a lockfile to /tmp
(or whatever the system temporary file directory is) to ensure this script is only run once.
migrate-override-toggle
Usage: migrate-override-toggle
Toggles the migration lock file manually.
Can be useful to recover from a crash without having to dig through /tmp
or to just manually enable maintenance mode.
new-migration
Usage: new-migration [NAME PART]...
Creates a new database migration, part of the Index framework.
A new file will be written to the database
folder within the project following a template embedded in the Index library source code.
All arguments of passed to the command will be concatenated to form the name of the migration.
nuke-file
Usage: nuke-file [OPTION]... [FILE]
The nuclear approach. Deletes a file from the storage and takes any associated uploads down with it.
This tool accepts three options:
-h
/--hash
: Treat the provided ID as a SHA256 hash, can be hex, URI-safe base64 or raw if you're feeling feisty.-s
/--base62
: Interpret provided ID as a base62 number.-u
/--upload
: Interpret provided ID as an upload ID instead of a file ID.-v
/--variant=VARIANT
: If using-u
/--upload
, specify the name of the variant. If left omitted the all variants will be removed.