From 7e63368b99fd70a6f8e172cad68ba6c51ab4fe8c Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Tue, 11 Nov 2025 00:53:05 +0100 Subject: [PATCH 1/8] Add Retype script --- ct/headers/retype | 7 ++++ ct/retype.sh | 65 ++++++++++++++++++++++++++++++++ frontend/public/json/retype.json | 35 +++++++++++++++++ install/retype-install.sh | 53 ++++++++++++++++++++++++++ 4 files changed, 160 insertions(+) create mode 100644 ct/headers/retype create mode 100644 ct/retype.sh create mode 100644 frontend/public/json/retype.json create mode 100644 install/retype-install.sh diff --git a/ct/headers/retype b/ct/headers/retype new file mode 100644 index 0000000000..d3bbad6fa5 --- /dev/null +++ b/ct/headers/retype @@ -0,0 +1,7 @@ + ____ __ + / __ \___ / /___ ______ ___ + / /_/ / _ \/ __/ / / / __ \/ _ \ + / _, _/ __/ /_/ /_/ / /_/ / __/ +/_/ |_|\___/\__/\__, / .___/\___/ + /____/_/ + diff --git a/ct/retype.sh b/ct/retype.sh new file mode 100644 index 0000000000..c0725431be --- /dev/null +++ b/ct/retype.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/kairosys-dev/ProxmoxVE_flood/retype/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kairosys-dev +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://retype.com/ + +APP="Retype" +var_tags="${var_tags:-docs}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-ubuntu}" +var_version="${var_version:-24.04}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f "/root/retype.yml" ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Stopping $APP" + systemctl stop $APP + msg_ok "Stopped $APP" + + msg_info "Creating Backup" + tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /root/* + msg_ok "Backup Created" + + msg_info "Updating $APP to v${RELEASE}" + $STD npm install retypeapp --global + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting $APP" + systemctl start $APP + msg_ok "Started $APP" + + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Update Successful" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5001${CL}" diff --git a/frontend/public/json/retype.json b/frontend/public/json/retype.json new file mode 100644 index 0000000000..bc76201aff --- /dev/null +++ b/frontend/public/json/retype.json @@ -0,0 +1,35 @@ +{ + "name": "Retype", + "slug": "retype", + "categories": [ + 12 + ], + "date_created": "2025-11-11", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 5001, + "documentation": "https://retype.com/", + "config_path": "/root/retype.yml", + "website": "https://retype.com/", + "logo": "https://avatars.githubusercontent.com/u/76267054", + "description": "Retype is a static website generator that builds a website based on simple Markdown (.md) text files. Focus on your writing while Retype builds the rest.", + "install_methods": [ + { + "type": "default", + "script": "ct/retype.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Ubuntu", + "version": "24.04" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/retype-install.sh b/install/retype-install.sh new file mode 100644 index 0000000000..7c1c8941b7 --- /dev/null +++ b/install/retype-install.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kairosys-dev +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://retype.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + nodejs \ + npm +msg_ok "Installed Dependencies" + +NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs + +msg_info "Setup ${APPLICATION}" +$STD npm install retypeapp --global +RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +msg_ok "Setup ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/"${APPLICATION}".service +[Unit] +Description=${APPLICATION} Service +After=network.target + +[Service] +ExecStart=retype start --host 0.0.0.0 +Restart=always +WorkingDirectory=/root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now "${APPLICATION}" +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From fb8273be6dcef0b521717205f9f4851e9042250c Mon Sep 17 00:00:00 2001 From: "kairosys::main" Date: Tue, 11 Nov 2025 01:01:43 +0100 Subject: [PATCH 2/8] fix source URL in ct/retype.sh --- ct/retype.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/retype.sh b/ct/retype.sh index c0725431be..acbd7f96b3 100644 --- a/ct/retype.sh +++ b/ct/retype.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/kairosys-dev/ProxmoxVE_flood/retype/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kairosys-dev # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 2b254a3b0ee6a937760475ec8d58520c1616e983 Mon Sep 17 00:00:00 2001 From: "kairosys::main" Date: Tue, 11 Nov 2025 10:27:33 +0100 Subject: [PATCH 3/8] remove ct/headers/retype, as it's automatically generated --- ct/headers/retype | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 ct/headers/retype diff --git a/ct/headers/retype b/ct/headers/retype deleted file mode 100644 index d3bbad6fa5..0000000000 --- a/ct/headers/retype +++ /dev/null @@ -1,7 +0,0 @@ - ____ __ - / __ \___ / /___ ______ ___ - / /_/ / _ \/ __/ / / / __ \/ _ \ - / _, _/ __/ /_/ /_/ / /_/ / __/ -/_/ |_|\___/\__/\__, / .___/\___/ - /____/_/ - From 612c9a78adc2befb44e9ffb6aabe8801ef73f753 Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Tue, 11 Nov 2025 10:52:04 +0100 Subject: [PATCH 4/8] add all requested changes (except fetch_and_deploy_gh_release, for now) --- ct/retype.sh | 24 ++++++++++++------------ frontend/public/json/retype.json | 4 ++-- install/retype-install.sh | 21 ++++++--------------- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/ct/retype.sh b/ct/retype.sh index acbd7f96b3..ff9ac2c10d 100644 --- a/ct/retype.sh +++ b/ct/retype.sh @@ -10,8 +10,8 @@ var_tags="${var_tags:-docs}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-2048}" var_disk="${var_disk:-8}" -var_os="${var_os:-ubuntu}" -var_version="${var_version:-24.04}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -31,26 +31,26 @@ function update_script() { RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then - msg_info "Stopping $APP" - systemctl stop $APP - msg_ok "Stopped $APP" + msg_info "Stopping Retype.service" + systemctl stop Retype.service + msg_ok "Stopped Retype.service" msg_info "Creating Backup" - tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /root/* + tar -czf "/opt/Retype_backup_$(date +%F).tar.gz" /root/* msg_ok "Backup Created" - msg_info "Updating $APP to v${RELEASE}" + msg_info "Updating Retype to v${RELEASE}" $STD npm install retypeapp --global - msg_ok "Updated $APP to v${RELEASE}" + msg_ok "Updated Retype to v${RELEASE}" - msg_info "Starting $APP" - systemctl start $APP - msg_ok "Started $APP" + msg_info "Starting Retype.service" + systemctl start Retype.service + msg_ok "Started Retype.service" echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Update Successful" else - msg_ok "No update required. ${APP} is already at v${RELEASE}" + msg_ok "No update required. Retype is already at v${RELEASE}" fi exit } diff --git a/frontend/public/json/retype.json b/frontend/public/json/retype.json index bc76201aff..714b20aef0 100644 --- a/frontend/public/json/retype.json +++ b/frontend/public/json/retype.json @@ -22,8 +22,8 @@ "cpu": 2, "ram": 2048, "hdd": 8, - "os": "Ubuntu", - "version": "24.04" + "os": "Debian", + "version": "13" } } ], diff --git a/install/retype-install.sh b/install/retype-install.sh index 7c1c8941b7..d745aa7fdd 100644 --- a/install/retype-install.sh +++ b/install/retype-install.sh @@ -13,24 +13,18 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - nodejs \ - npm -msg_ok "Installed Dependencies" - NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs -msg_info "Setup ${APPLICATION}" +msg_info "Setup Retype" $STD npm install retypeapp --global RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt -msg_ok "Setup ${APPLICATION}" +msg_ok "Setup Retype" msg_info "Creating Service" -cat </etc/systemd/system/"${APPLICATION}".service +cat </etc/systemd/system/Retype.service [Unit] -Description=${APPLICATION} Service +Description=Retype Service After=network.target [Service] @@ -41,13 +35,10 @@ WorkingDirectory=/root [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now "${APPLICATION}" +systemctl enable -q --now Retype.service msg_ok "Created Service" motd_ssh customize -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned" +cleanup_lxc From fd590a24a45e329210c7a76404eb6bf45c4bb334 Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Tue, 11 Nov 2025 10:53:24 +0100 Subject: [PATCH 5/8] Proxmox VED --- ct/retype.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/retype.sh b/ct/retype.sh index ff9ac2c10d..42e7a3d88e 100644 --- a/ct/retype.sh +++ b/ct/retype.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) # Copyright (c) 2021-2025 community-scripts ORG # Author: kairosys-dev # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE From 58e68e33f0a9ee5b8b414d087aaa3fead79a650f Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Tue, 11 Nov 2025 11:34:54 +0100 Subject: [PATCH 6/8] update GitHub logo to selfh.st --- frontend/public/json/retype.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/retype.json b/frontend/public/json/retype.json index 714b20aef0..a667a4d886 100644 --- a/frontend/public/json/retype.json +++ b/frontend/public/json/retype.json @@ -12,7 +12,7 @@ "documentation": "https://retype.com/", "config_path": "/root/retype.yml", "website": "https://retype.com/", - "logo": "https://avatars.githubusercontent.com/u/76267054", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/retype-light.svg", "description": "Retype is a static website generator that builds a website based on simple Markdown (.md) text files. Focus on your writing while Retype builds the rest.", "install_methods": [ { From 6309b8156d5f9f1f61c74ef4d4180e3f8728a46c Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Thu, 13 Nov 2025 19:10:38 +0100 Subject: [PATCH 7/8] switch from GitHub + npm version combination to npm registry query --- ct/retype.sh | 2 +- install/retype-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/retype.sh b/ct/retype.sh index 42e7a3d88e..7ae777e30b 100644 --- a/ct/retype.sh +++ b/ct/retype.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -s https://registry.npmjs.org/retype | grep -Po '"latest":"\K[^"]+') if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping Retype.service" systemctl stop Retype.service diff --git a/install/retype-install.sh b/install/retype-install.sh index d745aa7fdd..7e9fd09838 100644 --- a/install/retype-install.sh +++ b/install/retype-install.sh @@ -17,7 +17,7 @@ NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs msg_info "Setup Retype" $STD npm install retypeapp --global -RELEASE=$(curl -fsSL https://api.github.com/repos/retypeapp/retype/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE=$(curl -s https://registry.npmjs.org/retype | grep -Po '"latest":"\K[^"]+') echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt msg_ok "Setup Retype" From 663123d8b69f2d4a8e95f7975013137f3391b68d Mon Sep 17 00:00:00 2001 From: kairosys-dev Date: Sun, 16 Nov 2025 18:29:33 +0100 Subject: [PATCH 8/8] obtain release using npm --- ct/retype.sh | 2 +- install/retype-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/retype.sh b/ct/retype.sh index 7ae777e30b..d555f4da17 100644 --- a/ct/retype.sh +++ b/ct/retype.sh @@ -29,7 +29,7 @@ function update_script() { exit fi - RELEASE=$(curl -s https://registry.npmjs.org/retype | grep -Po '"latest":"\K[^"]+') + RELEASE=$(npm view retype version) if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then msg_info "Stopping Retype.service" systemctl stop Retype.service diff --git a/install/retype-install.sh b/install/retype-install.sh index 7e9fd09838..6b51452d1d 100644 --- a/install/retype-install.sh +++ b/install/retype-install.sh @@ -17,7 +17,7 @@ NODE_VERSION="22" NODE_MODULE="node-gyp" setup_nodejs msg_info "Setup Retype" $STD npm install retypeapp --global -RELEASE=$(curl -s https://registry.npmjs.org/retype | grep -Po '"latest":"\K[^"]+') +RELEASE=$(npm view retype version) echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt msg_ok "Setup Retype"