Compare commits

..

23 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
2c7fb75f6d Harden code-server addon install script
Refactor the code-server installer to be more robust: introduce a config_path variable and preexisting_config flag, use quoted ${HOME} paths, and only write a default config.yaml when none exists. Move systemctl enable after config creation and add an active check that errors out if the code-server service fails to start. Also tidy up variable quoting and cleanup steps for safer execution.
2026-03-20 10:51:55 +01:00
community-scripts-pr-app[bot]
185dd557ee Update .app files (#13113)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-03-20 09:33:03 +01:00
community-scripts-pr-app[bot]
c2705928a7 Update CHANGELOG.md (#13112)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-20 08:06:48 +00:00
push-app-to-main[bot]
50c422f11b teleport (#13086)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2026-03-20 09:06:25 +01:00
community-scripts-pr-app[bot]
fd96117bc4 Update CHANGELOG.md (#13109)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 22:47:21 +00:00
Zelnes
2cbba485b3 fix: remove extra backslash to match single quoted here-doc (#13108) 2026-03-19 23:46:55 +01:00
community-scripts-pr-app[bot]
25c21835cc Update CHANGELOG.md (#13107)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 21:18:55 +00:00
CanbiZ (MickLesk)
8c35c68c9c tools.func: display pin reason in release-check messages (#13095)
* Display pin reason in release-check messages

Add an optional pin_reason parameter to check_for_gh_release and check_for_codeberg_release and update the no-update messaging to show the provided reason. If no reason is supplied, show a default message indicating the update is temporarily held back due to issues with newer releases. This improves user feedback when versions are intentionally pinned.

* Add informational args to release checks

Pass extra informational strings to check_for_gh_release calls to surface release-specific notes. Updated ct/immich.sh (notes for Immich and VectorChord releases), ct/opencloud.sh (note for OpenCloud), and ct/plant-it.sh (note about web frontend presence). These messages clarify testing/compatibility expectations when checking/releases.
2026-03-19 22:18:27 +01:00
community-scripts-pr-app[bot]
d9addf78a3 Update CHANGELOG.md (#13106)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 20:56:21 +00:00
CanbiZ (MickLesk)
245433f535 tools.func: use dpkg-query for reliable JDK version detection (#13101) 2026-03-19 21:55:58 +01:00
community-scripts-pr-app[bot]
0c70fa5a5b Update CHANGELOG.md (#13104)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 20:18:34 +00:00
CanbiZ (MickLesk)
d45129c039 Reactive-Resume: Upgrade Node to 24 and enable Corepack (#13093)
Bump Node.js from 22 to 24 in the Reactive Resume install and update scripts. Invoke setup_nodejs during update, and enable Corepack (with COREPACK_ENABLE_DOWNLOAD_PROMPT=0) and run corepack prepare --activate before running pnpm install in both install and update flows. This ensures pnpm is available and non-interactive on Node 24 and prevents download prompts during CI/automated updates.
2026-03-19 21:18:10 +01:00
CanbiZ (MickLesk)
fa57b7a1d3 NocoDB: Unpin Version to latest (#13094)
* NocoDB: Unpin Version to latest

Updated the nocodb.sh script to fetch the latest release instead of a specific version.

* Update NocoDB installation script to use latest release

* remove old echo

Update NocoDB service file creation in install script.
2026-03-19 21:18:02 +01:00
community-scripts-pr-app[bot]
d0af062c18 Update CHANGELOG.md (#13102)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 19:35:02 +00:00
Adnan Valdes
23290f4042 Update link from helper-scripts.com to community-scripts.org (#13098) 2026-03-19 20:34:34 +01:00
community-scripts-pr-app[bot]
8c452e855b Update CHANGELOG.md (#13090)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 14:49:24 +00:00
CanbiZ (MickLesk)
24ce6e006b Increase Tracearr RAM; derive APP_VERSION (#13087) 2026-03-19 15:47:40 +01:00
community-scripts-pr-app[bot]
84c7647841 Update CHANGELOG.md (#13082)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 09:04:41 +00:00
community-scripts-pr-app[bot]
24429475f8 Update CHANGELOG.md (#13081)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-19 09:04:19 +00:00
Slaviša Arežina
32127096e5 Update projectsend.sh to include installation URL (#13078) 2026-03-19 10:04:07 +01:00
Copilot
923fbf96d8 Owncast: increase default disk size from 2GB to 10GB (#13079)
* Initial plan

* increase owncast HDD default from 2GB to 10GB

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
2026-03-19 10:03:48 +01:00
CanbiZ (MickLesk)
1ce0af9455 Bump Node to 24; pin webworkify-webpack
Update Node.js version from 22 to 24 in ct/dispatcharr.sh and install/dispatcharr-install.sh. Add a package.json override to force webworkify-webpack@2.1.3 and remove package-lock.json before running npm install during the frontend build to avoid dependency/lock conflicts and ensure a successful build.
2026-03-19 09:26:15 +01:00
CanbiZ (MickLesk)
8879b8ec2e downgrade to node22 2026-03-19 09:00:47 +01:00
19 changed files with 162 additions and 42 deletions

View File

@@ -423,17 +423,41 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details> </details>
## 2026-03-20
### 🆕 New Scripts
- teleport ([#13086](https://github.com/community-scripts/ProxmoxVE/pull/13086))
## 2026-03-19 ## 2026-03-19
### 🚀 Updated Scripts ### 🚀 Updated Scripts
- Owncast: increase default disk size from 2GB to 10GB [@Copilot](https://github.com/Copilot) ([#13079](https://github.com/community-scripts/ProxmoxVE/pull/13079))
- #### 🐞 Bug Fixes - #### 🐞 Bug Fixes
- fix: remove extra backslash to match single quoted here-doc [@Zelnes](https://github.com/Zelnes) ([#13108](https://github.com/community-scripts/ProxmoxVE/pull/13108))
- Reactive-Resume: Upgrade Node to 24 and enable Corepack [@MickLesk](https://github.com/MickLesk) ([#13093](https://github.com/community-scripts/ProxmoxVE/pull/13093))
- Increase Tracearr RAM; derive APP_VERSION [@MickLesk](https://github.com/MickLesk) ([#13087](https://github.com/community-scripts/ProxmoxVE/pull/13087))
- ProjectSend: Update application access URL [@tremor021](https://github.com/tremor021) ([#13078](https://github.com/community-scripts/ProxmoxVE/pull/13078))
- Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074)) - Dispatcharr: use npm install --no-audit --progress=false [@MickLesk](https://github.com/MickLesk) ([#13074](https://github.com/community-scripts/ProxmoxVE/pull/13074))
- core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072)) - core: reorder hwaccel setup and adjust GPU group usermod [@MickLesk](https://github.com/MickLesk) ([#13072](https://github.com/community-scripts/ProxmoxVE/pull/13072))
- #### ✨ New Features
- tools.func: display pin reason in release-check messages [@MickLesk](https://github.com/MickLesk) ([#13095](https://github.com/community-scripts/ProxmoxVE/pull/13095))
- NocoDB: Unpin Version to latest [@MickLesk](https://github.com/MickLesk) ([#13094](https://github.com/community-scripts/ProxmoxVE/pull/13094))
### 💾 Core
- #### 🐞 Bug Fixes
- tools.func: use dpkg-query for reliable JDK version detection [@MickLesk](https://github.com/MickLesk) ([#13101](https://github.com/community-scripts/ProxmoxVE/pull/13101))
### 📚 Documentation ### 📚 Documentation
- Update link from helper-scripts.com to community-scripts.org [@adnanvaldes](https://github.com/adnanvaldes) ([#13098](https://github.com/community-scripts/ProxmoxVE/pull/13098))
- github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075)) - github: add PocketBase bot workflow [@MickLesk](https://github.com/MickLesk) ([#13075](https://github.com/community-scripts/ProxmoxVE/pull/13075))
## 2026-03-18 ## 2026-03-18

View File

@@ -130,7 +130,7 @@ Choose your preferred installation method:
The fastest way to get started: The fastest way to get started:
1. Visit **[helper-scripts.com](https://helper-scripts.com/)** 🌐 1. Visit **[community-scripts.org](https://community-scripts.org/)** 🌐
2. Search for your desired script (e.g., "Home Assistant", "Docker") 2. Search for your desired script (e.g., "Home Assistant", "Docker")
3. Copy the bash command displayed on the script page 3. Copy the bash command displayed on the script page
4. Open your **Proxmox Shell** and paste the command 4. Open your **Proxmox Shell** and paste the command

View File

@@ -110,6 +110,8 @@ function update_script() {
msg_info "Building Frontend" msg_info "Building Frontend"
cd /opt/dispatcharr/frontend cd /opt/dispatcharr/frontend
node -e "const p=require('./package.json');p.overrides=p.overrides||{};p.overrides['webworkify-webpack']='2.1.3';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2));"
rm -f package-lock.json
$STD npm install --no-audit --progress=false $STD npm install --no-audit --progress=false
$STD npm run build $STD npm run build
msg_ok "Built Frontend" msg_ok "Built Frontend"

6
ct/headers/teleport Normal file
View File

@@ -0,0 +1,6 @@
______ __ __
/_ __/__ / /__ ____ ____ _____/ /_
/ / / _ \/ / _ \/ __ \/ __ \/ ___/ __/
/ / / __/ / __/ /_/ / /_/ / / / /_
/_/ \___/_/\___/ .___/\____/_/ \__/
/_/

View File

@@ -110,7 +110,7 @@ EOF
fi fi
RELEASE="v2.5.6" RELEASE="v2.5.6"
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}"; then if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
if [[ $(cat ~/.immich) > "2.5.1" ]]; then if [[ $(cat ~/.immich) > "2.5.1" ]]; then
msg_info "Enabling Maintenance Mode" msg_info "Enabling Maintenance Mode"
cd /opt/immich/app/bin cd /opt/immich/app/bin
@@ -125,7 +125,7 @@ EOF
msg_ok "Stopped Services" msg_ok "Stopped Services"
VCHORD_RELEASE="0.5.3" VCHORD_RELEASE="0.5.3"
[[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord [[ -f ~/.vchord_version ]] && mv ~/.vchord_version ~/.vectorchord
if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}"; then if check_for_gh_release "VectorChord" "tensorchord/VectorChord" "${VCHORD_RELEASE}" "updated together with Immich after testing"; then
fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb" fetch_and_deploy_gh_release "VectorChord" "tensorchord/VectorChord" "binary" "${VCHORD_RELEASE}" "/tmp" "postgresql-16-vchord_*_amd64.deb"
systemctl restart postgresql systemctl restart postgresql
$STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;" $STD sudo -u postgres psql -d immich -c "ALTER EXTENSION vector UPDATE;"

View File

@@ -23,17 +23,18 @@ function update_script() {
header_info header_info
check_container_storage check_container_storage
check_container_resources check_container_resources
RELEASE="0.301.1" #RELEASE="0.301.1"
if [[ ! -f /etc/systemd/system/nocodb.service ]]; then if [[ ! -f /etc/systemd/system/nocodb.service ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
if check_for_gh_release "nocodb" "nocodb/nocodb" "${RELEASE}"; then #if check_for_gh_release "nocodb" "nocodb/nocodb" "${RELEASE}"; then
if check_for_gh_release "nocodb" "nocodb/nocodb"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop nocodb systemctl stop nocodb
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "${RELEASE}" "/opt/nocodb/" "Noco-linux-x64" fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start nocodb systemctl start nocodb

View File

@@ -30,7 +30,7 @@ function update_script() {
fi fi
RELEASE="v5.2.0" RELEASE="v5.2.0"
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}"; then if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
msg_info "Stopping services" msg_info "Stopping services"
systemctl stop opencloud opencloud-wopi systemctl stop opencloud opencloud-wopi
msg_ok "Stopped services" msg_ok "Stopped services"

View File

@@ -9,7 +9,7 @@ APP="Owncast"
var_tags="${var_tags:-broadcasting}" var_tags="${var_tags:-broadcasting}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-2}" var_disk="${var_disk:-10}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"

View File

@@ -29,7 +29,7 @@ function update_script() {
exit exit
fi fi
setup_mariadb setup_mariadb
if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}"; then if check_for_gh_release "plant-it" "MDeLuise/plant-it" "${RELEASE}" "last version that includes the web frontend"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop plant-it systemctl stop plant-it
msg_info "Stopped Service" msg_info "Stopped Service"

View File

@@ -34,10 +34,14 @@ function update_script() {
msg_ok "Stopped services" msg_ok "Stopped services"
cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak cp /opt/reactive-resume/.env /opt/reactive-resume.env.bak
NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "tarball" "latest" "/opt/reactive-resume"
msg_info "Updating Reactive Resume (Patience)" msg_info "Updating Reactive Resume (Patience)"
cd /opt/reactive-resume cd /opt/reactive-resume
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable
corepack prepare --activate
export CI="true" export CI="true"
export NODE_ENV="production" export NODE_ENV="production"
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile

46
ct/teleport.sh Normal file
View File

@@ -0,0 +1,46 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://goteleport.com/
APP="Teleport"
var_tags="${var_tags:-zero-trust}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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 /etc/teleport.yaml ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating Teleport"
$STD apt update
$STD apt upgrade -y
msg_ok "Updated successfully!"
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}https://${IP}:3080${CL}"

View File

@@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="Tracearr" APP="Tracearr"
var_tags="${var_tags:-media}" var_tags="${var_tags:-media}"
var_cpu="${var_cpu:-2}" var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-4096}"
var_disk="${var_disk:-10}" var_disk="${var_disk:-10}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-13}" var_version="${var_version:-13}"
@@ -140,7 +140,7 @@ EOF
msg_ok "Built Tracearr" msg_ok "Built Tracearr"
msg_info "Configuring Tracearr" msg_info "Configuring Tracearr"
sed -i "s/^APP_VERSION=.*/APP_VERSION=$(cat /root/.tracearr)/" /data/tracearr/.env sed -i "s|^APP_VERSION=.*|APP_VERSION=${CHECK_UPDATE_RELEASE#v}|" /data/tracearr/.env
chmod 600 /data/tracearr/.env chmod 600 /data/tracearr/.env
chown -R tracearr:tracearr /data/tracearr chown -R tracearr:tracearr /data/tracearr
mkdir -p /data/backup mkdir -p /data/backup

View File

@@ -66,6 +66,8 @@ CELERY_BROKER_URL=redis://localhost:6379/0
DJANGO_SECRET_KEY=$DJANGO_SECRET DJANGO_SECRET_KEY=$DJANGO_SECRET
EOF EOF
cd /opt/dispatcharr/frontend cd /opt/dispatcharr/frontend
node -e "const p=require('./package.json');p.overrides=p.overrides||{};p.overrides['webworkify-webpack']='2.1.3';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2));"
rm -f package-lock.json
$STD npm install --no-audit --progress=false $STD npm install --no-audit --progress=false
$STD npm run build $STD npm run build
msg_ok "Configured Dispatcharr" msg_ok "Configured Dispatcharr"

View File

@@ -13,11 +13,11 @@ setting_up_container
network_check network_check
update_os update_os
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "0.301.1" "/opt/nocodb/" "Noco-linux-x64" fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-x64"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/nocodb.service cat <<EOF >/etc/systemd/system/nocodb.service
echo "[Unit] [Unit]
Description=nocodb Description=nocodb
[Service] [Service]

View File

@@ -36,7 +36,7 @@ ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \ --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus/ \ --storage.tsdb.path=/var/lib/prometheus/ \
--web.listen-address=0.0.0.0:9090 --web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP \$MAINPID ExecReload=/bin/kill -HUP $MAINPID
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@@ -15,7 +15,7 @@ update_os
PG_VERSION="16" setup_postgresql PG_VERSION="16" setup_postgresql
PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db PG_DB_NAME="reactive_resume" PG_DB_USER="reactive_resume" setup_postgresql_db
NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs NODE_VERSION="24" setup_nodejs
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt install -y chromium $STD apt install -y chromium
@@ -25,6 +25,9 @@ fetch_and_deploy_gh_release "reactive-resume" "amruthpillai/reactive-resume" "ta
msg_info "Building Reactive Resume (Patience)" msg_info "Building Reactive Resume (Patience)"
cd /opt/reactive-resume cd /opt/reactive-resume
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable
corepack prepare --activate
export NODE_ENV="production" export NODE_ENV="production"
export CI="true" export CI="true"
$STD pnpm install --frozen-lockfile $STD pnpm install --frozen-lockfile

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://goteleport.com/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
setup_deb822_repo \
"teleport" \
"https://deb.releases.teleport.dev/teleport-pubkey.asc" \
"https://apt.releases.teleport.dev/debian" \
"trixie" \
"stable/v18"
msg_info "Configuring Teleport"
$STD apt install -y teleport
$STD teleport configure -o /etc/teleport.yaml
systemctl enable -q --now teleport
sleep 10
tctl users add teleport-admin --roles=editor,access --logins=root >~/teleportadmin.txt
sed -i "s|https://[^:]*:3080|https://${LOCAL_IP}:3080|g" ~/teleportadmin.txt
msg_ok "Configured Teleport"
motd_ssh
customize
cleanup_lxc

View File

@@ -2271,6 +2271,7 @@ check_for_gh_release() {
local app="$1" local app="$1"
local source="$2" local source="$2"
local pinned_version_in="${3:-}" # optional local pinned_version_in="${3:-}" # optional
local pin_reason="${4:-}" # optional reason shown to user
local app_lc="" local app_lc=""
app_lc="$(echo "${app,,}" | tr -d ' ')" app_lc="$(echo "${app,,}" | tr -d ' ')"
local current_file="$HOME/.${app_lc}" local current_file="$HOME/.${app_lc}"
@@ -2444,7 +2445,11 @@ check_for_gh_release() {
return 0 return 0
fi fi
msg_ok "No update available: ${app} is already on pinned version (${current})" if [[ -n "$pin_reason" ]]; then
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
else
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
fi
return 1 return 1
fi fi
@@ -2483,6 +2488,7 @@ check_for_codeberg_release() {
local app="$1" local app="$1"
local source="$2" local source="$2"
local pinned_version_in="${3:-}" # optional local pinned_version_in="${3:-}" # optional
local pin_reason="${4:-}" # optional reason shown to user
local app_lc="${app,,}" local app_lc="${app,,}"
local current_file="$HOME/.${app_lc}" local current_file="$HOME/.${app_lc}"
@@ -2562,7 +2568,11 @@ check_for_codeberg_release() {
return 0 return 0
fi fi
msg_ok "No update available: ${app} is already on pinned version (${current})" if [[ -n "$pin_reason" ]]; then
msg_ok "No update available: ${app} (${current}) - update held back: ${pin_reason}"
else
msg_ok "No update available: ${app} (${current}) - update temporarily held back due to issues with newer releases"
fi
return 1 return 1
fi fi
@@ -5353,24 +5363,7 @@ function setup_java() {
# Get currently installed version # Get currently installed version
local INSTALLED_VERSION="" local INSTALLED_VERSION=""
if dpkg -l | grep -q "temurin-.*-jdk" 2>/dev/null; then INSTALLED_VERSION=$(dpkg-query -W -f '${Package}\n' 2>/dev/null | grep -oP '^temurin-\K[0-9]+(?=-jdk$)' | head -n1 || echo "")
INSTALLED_VERSION=$(dpkg -l 2>/dev/null | awk '/temurin-.*-jdk/{print $2}' | grep -oP 'temurin-\K[0-9]+' | head -n1 || echo "")
fi
# Validate INSTALLED_VERSION is not empty if JDK package found
local JDK_COUNT=0
JDK_COUNT=$(dpkg -l 2>/dev/null | grep -c "temurin-.*-jdk" || true)
if [[ -z "$INSTALLED_VERSION" && "${JDK_COUNT:-0}" -gt 0 ]]; then
msg_warn "Found Temurin JDK but cannot determine version - attempting reinstall"
# Try to get actual package name for purge
local OLD_PACKAGE
OLD_PACKAGE=$(dpkg -l 2>/dev/null | awk '/temurin-.*-jdk/{print $2}' | head -n1 || echo "")
if [[ -n "$OLD_PACKAGE" ]]; then
msg_info "Removing existing package: $OLD_PACKAGE"
$STD apt purge -y "$OLD_PACKAGE" || true
fi
INSTALLED_VERSION="" # Reset to trigger fresh install
fi
# Scenario 1: Already at correct version # Scenario 1: Already at correct version
if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then if [[ "$INSTALLED_VERSION" == "$JAVA_VERSION" ]]; then

View File

@@ -89,26 +89,31 @@ VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/lat
awk '{print substr($2, 3, length($2)-4) }') awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing Code-Server v${VERSION}" msg_info "Installing Code-Server v${VERSION}"
config_path="${HOME}/.config/code-server/config.yaml"
preexisting_config=false
if [ -f ~/.config/code-server/config.yaml ]; then if [ -f "$config_path" ]; then
existing_config=true preexisting_config=true
fi fi
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null
rm -rf code-server_"${VERSION}"_amd64.deb rm -rf code-server_"${VERSION}"_amd64.deb
mkdir -p ~/.config/code-server/ mkdir -p "${HOME}/.config/code-server/"
systemctl enable -q --now code-server@"$USER"
if [ $existing_config = false ]; then if [ "$preexisting_config" = false ]; then
cat <<EOF >~/.config/code-server/config.yaml cat <<EOF >"$config_path"
bind-addr: 0.0.0.0:8680 bind-addr: 0.0.0.0:8680
auth: none auth: none
password: password:
cert: false cert: false
EOF EOF
fi fi
systemctl enable -q --now code-server@"$USER"
systemctl restart code-server@"$USER" systemctl restart code-server@"$USER"
if ! systemctl is-active --quiet code-server@"$USER"; then
error_exit "code-server service failed to start."
fi
msg_ok "Installed Code-Server v${VERSION} on $hostname" msg_ok "Installed Code-Server v${VERSION} on $hostname"
echo -e "${APP} should be reachable by going to the following URL. echo -e "${APP} should be reachable by going to the following URL.