|
|
@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
#set -x |
|
|
|
|
|
|
|
# source: https://forum.duniter.org/t/synchroniser-duniter-plus-rapidement/7689 |
|
|
|
|
|
|
|
function usage { |
|
|
|
echo "Usage: $0 [options]" |
|
|
|
echo " -h --help : display this help and exit" |
|
|
@ -24,16 +26,16 @@ while getopts "ahsn:m:-:" option; do |
|
|
|
help) |
|
|
|
usage |
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
;; |
|
|
|
start) |
|
|
|
start="true" |
|
|
|
;; |
|
|
|
node) |
|
|
|
node="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) |
|
|
|
;; |
|
|
|
;; |
|
|
|
mdb) |
|
|
|
mdb="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) |
|
|
|
;; |
|
|
|
;; |
|
|
|
all-data) |
|
|
|
include_all_data="true" |
|
|
|
;; |
|
|
@ -50,7 +52,7 @@ while getopts "ahsn:m:-:" option; do |
|
|
|
;; |
|
|
|
a) |
|
|
|
include_all_data="true" |
|
|
|
;; |
|
|
|
;; |
|
|
|
n) |
|
|
|
node=${OPTARG} |
|
|
|
;; |
|
|
@ -62,7 +64,7 @@ while getopts "ahsn:m:-:" option; do |
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
*) |
|
|
|
usage |
|
|
|
usage |
|
|
|
exit 1; |
|
|
|
;; |
|
|
|
esac |
|
|
@ -97,6 +99,3 @@ clean_tmpfs |
|
|
|
if [ -n "${start}" ]; then |
|
|
|
duniter start --mdb ${mdb} |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|