Add CA hash sidecar for onboarding
This commit is contained in:
@@ -192,6 +192,14 @@ finish_step 1
|
||||
begin_step 2
|
||||
cp "$CERT_DIR/pikit-ca.crt" "$WEB_ASSETS/pikit-ca.crt"
|
||||
chmod 644 "$WEB_ASSETS/pikit-ca.crt"
|
||||
if command -v sha256sum >/dev/null 2>&1; then
|
||||
sha256sum "$WEB_ASSETS/pikit-ca.crt" | awk '{print $1}' > "$WEB_ASSETS/pikit-ca.sha256"
|
||||
elif command -v openssl >/dev/null 2>&1; then
|
||||
openssl dgst -sha256 "$WEB_ASSETS/pikit-ca.crt" | awk '{print $2}' > "$WEB_ASSETS/pikit-ca.sha256"
|
||||
fi
|
||||
if [ -s "$WEB_ASSETS/pikit-ca.sha256" ]; then
|
||||
chmod 644 "$WEB_ASSETS/pikit-ca.sha256"
|
||||
fi
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl reload nginx || systemctl restart nginx
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user