Skip to content

Conversation

tofkamp
Copy link

@tofkamp tofkamp commented Aug 16, 2025

πŸ›‘ New scripts must first be submitted to ProxmoxVED for testing.
PRs for new scripts that skip this process will be closed.


✍️ Description

πŸ”— Related PR / Issue

Link: #

βœ… Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

πŸ› οΈ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • ✨ New feature – Adds new, non-breaking functionality.
  • πŸ’₯ Breaking change – Alters existing functionality in a way that may require updates.
  • πŸ†• New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • πŸ”§ Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • πŸ“ Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

πŸ” Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

πŸ“‹ Additional Information (optional)

@tofkamp tofkamp requested review from a team as code owners August 16, 2025 14:20
chown -R step:step /opt/step-ca
chmod -R og-rwx /opt/step-ca

cat << EOF | sed -i '/"name": "acme"/ r /dev/stdin' /opt/step-ca/config/ca.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt seem right

Copy link
Author

@tofkamp tofkamp Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does work, but not very readable. I searched the internet to do it in a better way, but found solutions with hardcoded linenumbers (ed), or shell scripts reading every line, or awk scripts do stuff. Because the (cat <<EOF) is an embedded file, there are not many options.
Finding the linenumber, then head,cat and tail, and rename the file back to the original name, is neither a good readable solution.
I am open for good ideas.

Comment on lines 134 to 145
{
echo "${YW}The public key of the root CA can be found at ${GN}/opt/step-ca/certs/root_ca.crt${CL}"
echo "${YW}or at ${BGN}https://$pki_dns/roots.pem${CL}"
echo "${YW}Fingerprint of CA ${GN}"`step certificate fingerprint /opt/step-ca/certs/root_ca.crt`"${CL}"
# step certificate inspect /opt/step-ca/certs/root_ca.crt --short
# cat /opt/step-ca/certs/root_ca.crt
echo -e "${CL}"
echo "${YW}The ACME directory server URL is ${BGN}https://$pki_dns/acme/acme/directory${CL}"
echo "${YW}Documentation on how to connect an ACME client to this server can be found at${CL}"
echo "${BGN}https://smallstep.com/docs/tutorials/acme-protocol-acme-clients/${CL}"
echo "${YW}An ACME-client test script (${GN}~/test-stepca.sh${YW}) can be found to test this setup.${CL}"
echo "${CL}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will hardcode colors

Copy link
Member

@tremor021 tremor021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lot's to fix

echo "${BGN}https://smallstep.com/docs/tutorials/acme-protocol-acme-clients/${CL}"
echo "${YW}An ACME-client test script (${GN}~/test-stepca.sh${YW}) can be found to test this setup.${CL}"
echo "${CL}"
} >$temp_file
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are hardcoded colour codes not wanted ? What is a better way to do this ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use them from core.func

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants