mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
improve documentation
This commit is contained in:
parent
5c43ab6ef8
commit
5de779a989
|
@ -125,13 +125,14 @@ class Administration
|
||||||
{
|
{
|
||||||
echo <<<'EOT'
|
echo <<<'EOT'
|
||||||
Usage:
|
Usage:
|
||||||
administration [--delete <paste id> | --empty-dirs | --help | --statistics]
|
administration [--delete <paste id> | --empty-dirs | --help | --purge | --statistics]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-d, --delete deletes the requested paste ID
|
-d, --delete deletes the requested paste ID
|
||||||
-e, --empty-dirs removes empty directories (only if Filesystem storage is
|
-e, --empty-dirs removes empty directories (only if Filesystem storage is
|
||||||
configured)
|
configured)
|
||||||
-h, --help displays this help message
|
-h, --help displays this help message
|
||||||
|
-p, --purge purge all expired pastes
|
||||||
-s, --statistics reads all stored pastes and comments and reports statistics
|
-s, --statistics reads all stored pastes and comments and reports statistics
|
||||||
EOT, PHP_EOL;
|
EOT, PHP_EOL;
|
||||||
exit($code);
|
exit($code);
|
||||||
|
|
12
bin/migrate
12
bin/migrate
|
@ -17,13 +17,14 @@ if (version_compare(PHP_VERSION, '7.1.0') < 0) {
|
||||||
|
|
||||||
$longopts = array(
|
$longopts = array(
|
||||||
"delete-after",
|
"delete-after",
|
||||||
"delete-during"
|
"delete-during",
|
||||||
|
"help"
|
||||||
);
|
);
|
||||||
$opts_arr = getopt("fhnv", $longopts, $rest);
|
$opts_arr = getopt("fhnv", $longopts, $rest);
|
||||||
if ($opts_arr === false) {
|
if ($opts_arr === false) {
|
||||||
dieerr("Erroneous command line options. Please use -h");
|
dieerr("Erroneous command line options. Please use --help");
|
||||||
}
|
}
|
||||||
if (array_key_exists("h", $opts_arr)) {
|
if (array_key_exists("h", $opts_arr) || array_key_exists("help", $opts_arr)) {
|
||||||
helpexit();
|
helpexit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,12 +174,12 @@ function debug ($text) {
|
||||||
|
|
||||||
function helpexit ()
|
function helpexit ()
|
||||||
{
|
{
|
||||||
print("migrate.php - Copy data between PrivateBin backends
|
print("migrate - Copy data between PrivateBin backends
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
|
migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
|
||||||
[<dstconfdir>]
|
[<dstconfdir>]
|
||||||
migrate [-h]
|
migrate [-h|--help]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--delete-after delete data from source after all pastes and comments have
|
--delete-after delete data from source after all pastes and comments have
|
||||||
|
@ -187,6 +188,7 @@ Options:
|
||||||
comments have successfully been copied to the destination
|
comments have successfully been copied to the destination
|
||||||
-f forcefully overwrite data which already exists at the
|
-f forcefully overwrite data which already exists at the
|
||||||
destination
|
destination
|
||||||
|
-h, --help displays this help message
|
||||||
-n dry run, do not copy data
|
-n dry run, do not copy data
|
||||||
-v be verbose
|
-v be verbose
|
||||||
<srcconfdir> use storage backend configration from conf.php found in
|
<srcconfdir> use storage backend configration from conf.php found in
|
||||||
|
|
Loading…
Reference in New Issue
Block a user