Skip to content

Conversation

@kairosys-dev
Copy link

@kairosys-dev kairosys-dev commented Nov 10, 2025

Scripts which are clearly AI generated and not further revied by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review.

✍️ Description

My pull request adds a script for hosting Retype, a static website generator that builds websites based on Markdown (.md) files, commonly used for documentation. It runs in an LXC.

🔗 Related PR / Issue

Link: (N/A)

✅ 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)

@michelroegl-brunner
Copy link
Member

@CrazyWolf13 Looks good to me, if you want we can merge it for testing.

fi

RELEASE=$(npm view retype version)
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

new location is ~/.${app}

Copy link
Author

Choose a reason for hiding this comment

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

You mean ~/.${APP}/${APP}_version.txt?


RELEASE=$(npm view retype version)
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
msg_info "Stopping Retype.service"
Copy link
Member

Choose a reason for hiding this comment

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

remove .service

msg_ok "Stopped Retype.service"

msg_info "Creating Backup"
tar -czf "/opt/Retype_backup_$(date +%F).tar.gz" /root/*
Copy link
Member

Choose a reason for hiding this comment

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

why the whole root, there is often user data that should not be included in the backup


msg_info "Creating Backup"
tar -czf "/opt/Retype_backup_$(date +%F).tar.gz" /root/*
msg_ok "Backup Created"
Copy link
Member

Choose a reason for hiding this comment

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

Created Backup to align with msg_info


NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs

msg_info "Setup Retype"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msg_info "Setup Retype"
msg_info "Setting up Retype"

msg_info "Setup Retype"
$STD npm install retypeapp --global
RELEASE=$(npm view retype version)
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
Copy link
Member

Choose a reason for hiding this comment

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

same here, use new location

msg_ok "Setup Retype"

msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/Retype.service
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cat <<EOF >/etc/systemd/system/Retype.service
cat <<EOF >/etc/systemd/system/retype.service

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now Retype.service
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
systemctl enable -q --now Retype.service
systemctl enable -q --now retype


motd_ssh
customize

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@kairosys-dev
Copy link
Author

Going to start working on all the requested changes. Will take me a while.

Sorry for not doing this earlier, I was busy with other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants