-
-
Notifications
You must be signed in to change notification settings - Fork 144
Add Retype script #1102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Retype script #1102
Conversation
|
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new location is ~/.${app}
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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/* |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| systemctl enable -q --now Retype.service | |
| systemctl enable -q --now retype |
|
|
||
| motd_ssh | ||
| customize | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
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. |
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)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
Code_Audit.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)📋 Additional Information (optional)