module/gerrit: prevent sslib to re-run on upmod
During a --upmod=gerrit, only re-run sslib encryption if new keystores
were generated. Don't if nothing has changed. Note, to force sslib, then
delete cached keystores, or wipe the whole staging directory
diff --git a/module/gerrit/module.sh b/module/gerrit/module.sh
index 1361d03..d8b9ec5 100644
--- a/module/gerrit/module.sh
+++ b/module/gerrit/module.sh
@@ -250,11 +250,11 @@
lets -l -e "failed to convert PKCS12 keystore: $mod_staging_d/$keystore"
return $s_err
}
- fi
- # Last bit, if we got this far, then we want to store the key password
- # and gerrit requires it at start up. Do this using gerrit sslib
- __gerrit_do_sslib || return $s_err
+ # Last bit, if we got this far, then we want to store the key password
+ # and gerrit requires it at start up. Do this using gerrit sslib
+ __gerrit_do_sslib || return $s_err
+ fi
sudo cp $mod_staging_d/$keystore_pkcs12 $keystore_f || return $s_err
sudo chmod 0600 $keystore_f && sudo chown root:root $keystore_f