diff --git a/bin/administration b/bin/administration index d3a7d63..bc82b43 100755 --- a/bin/administration +++ b/bin/administration @@ -125,13 +125,14 @@ class Administration { echo <<<'EOT' Usage: - administration [--delete | --empty-dirs | --help | --statistics] + administration [--delete | --empty-dirs | --help | --purge | --statistics] Options: -d, --delete deletes the requested paste ID -e, --empty-dirs removes empty directories (only if Filesystem storage is configured) -h, --help displays this help message + -p, --purge purge all expired pastes -s, --statistics reads all stored pastes and comments and reports statistics EOT, PHP_EOL; exit($code); diff --git a/bin/migrate b/bin/migrate index 515a5e8..76539ab 100755 --- a/bin/migrate +++ b/bin/migrate @@ -17,13 +17,14 @@ if (version_compare(PHP_VERSION, '7.1.0') < 0) { $longopts = array( "delete-after", - "delete-during" + "delete-during", + "help" ); $opts_arr = getopt("fhnv", $longopts, $rest); 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(); } @@ -173,12 +174,12 @@ function debug ($text) { function helpexit () { - print("migrate.php - Copy data between PrivateBin backends + print("migrate - Copy data between PrivateBin backends Usage: migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir [] - migrate [-h] + migrate [-h|--help] Options: --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 -f forcefully overwrite data which already exists at the destination + -h, --help displays this help message -n dry run, do not copy data -v be verbose use storage backend configration from conf.php found in