|
|
@ -86,7 +86,7 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
print_usage() { |
|
|
|
print_usage() { |
|
|
|
cat <<- ENDEND |
|
|
|
cat <<- ENDEND |
|
|
|
usage: ${progname} [-1c] account_address |
|
|
|
usage: ${progname} [-1ch] account_address |
|
|
|
-c back up database/logs and start clean |
|
|
|
-c back up database/logs and start clean |
|
|
|
(use only when directed by Harmony) |
|
|
|
(use only when directed by Harmony) |
|
|
|
-1 do not loop; run once and exit |
|
|
|
-1 do not loop; run once and exit |
|
|
@ -106,13 +106,14 @@ loop=true |
|
|
|
|
|
|
|
|
|
|
|
unset OPTIND OPTARG opt |
|
|
|
unset OPTIND OPTARG opt |
|
|
|
OPTIND=1 |
|
|
|
OPTIND=1 |
|
|
|
while getopts :c1 opt |
|
|
|
while getopts :1ch opt |
|
|
|
do |
|
|
|
do |
|
|
|
case "${opt}" in |
|
|
|
case "${opt}" in |
|
|
|
'?') usage "unrecognized option -${OPTARG}";; |
|
|
|
'?') usage "unrecognized option -${OPTARG}";; |
|
|
|
':') usage "missing argument for -${OPTARG}";; |
|
|
|
':') usage "missing argument for -${OPTARG}";; |
|
|
|
c) start_clean=true;; |
|
|
|
c) start_clean=true;; |
|
|
|
1) loop=false;; |
|
|
|
1) loop=false;; |
|
|
|
|
|
|
|
h) print_usage; exit 0;; |
|
|
|
*) err 70 "unhandled option -${OPTARG}";; # EX_SOFTWARE |
|
|
|
*) err 70 "unhandled option -${OPTARG}";; # EX_SOFTWARE |
|
|
|
esac |
|
|
|
esac |
|
|
|
done |
|
|
|
done |
|
|
|