FIN: overall Bootstrap and Lifecycle refactoring complete and tested

This commit is contained in:
JohnE 2018-08-25 10:58:36 -07:00
parent 3e28da6ac3
commit c27c4d3aa5
2 changed files with 16 additions and 4 deletions

View File

@ -41,6 +41,12 @@ main() {
fi
if [[ -n $PARAM1 ]] && [[ -n $PARAM2 ]]; then
UNIQ_ID="${PARAM2}.${PARAM1}"
if [[ -f "distro/client_${UNIQ_ID}.p12" ]]; then
echo_block "ERROR: certifate <<distro/client_${UNIQ_ID}.p12>> already exists"
usage
fi
gen_client $PARAM1 $PARAM2
else
usage

View File

@ -39,12 +39,18 @@ main() {
echo_block "ERROR: file cfg/SERIAL is missing"
usage
fi
if [[ ! -f "cfg/$PARAM1.cnf" ]]; then
echo_block "ERROR: file cfg/$PARAM1.cnf is missing"
usage
fi
if [[ -n $PARAM1 ]] && [[ -n $PARAM2 ]]; then
UNIQ_ID="${PARAM2}.${PARAM1}"
if [[ -f "distro/server_${UNIQ_ID}.p12" ]]; then
echo_block "ERROR: certifate <<distro/server_${UNIQ_ID}.p12>> already exists"
usage
fi
if [[ ! -f "cfg/${PARAM1}.cnf" ]]; then
echo_block "ERROR: configuration file <<cfg/${PARAM1}.cnf>> is missing"
usage
fi
gen_server $PARAM1 $PARAM2
else
usage