openethereum / parity-deploy

Parity deployment script.
Apache License 2.0
81 stars 52 forks source link

add pwdgen.sh script utils to generate password #68

Closed branciard closed 6 years ago

branciard commented 6 years ago

I add a utils script in /config/utils/pwdgen.sh separated from the parity-deploy.sh. It allow to generate passwords in deployment/n/password before launching parity-deploy.sh

password file was always reset on master since this commit https://github.com/paritytech/parity-deploy/blob/master/parity-deploy.sh#L55

Then, I introduce a test to not reset password file if present in parity-deploy.sh :

if [ ! -f $DEST_DIR/password ] ; then
  echo '' > $DEST_DIR/password
fi

exemple :

./config/utils/pwdgen.sh -n 4

here the usage :

Usage:
REQUIRED:
        -n | --nodes number_of_nodes
OPTIONAL:
        -l | --length password_length. Default: 12
        -o | --output output folder. Default: deployment
        -f | --force reset passord file if exist. Default: 0(false)
        -h | --help

What do you think?

ddorgan commented 6 years ago

@branciard thanks for the PR! Let me review and I'll get back to you....