fix: comprehensive script audit - bug fixes and optimizations
- ct/invidious.sh: fix copy-paste bug (OxiCloud code in update block) - install/invidious-install.sh: fix sed redirect, service filename mismatch - ct/forgejo-runner.sh: fix binary download path, bump Debian to 13 - ct/authentik.sh: add -f flag to curl (fail on HTTP errors) - ct/localagi.sh: add -f flag to curl, add installation check guard - ct/ente.sh: fix broken install check (/var -> /opt/ente), apt-get -> apt - ct/garmin-grafana.sh: add explicit tarball mode to fetch_and_deploy - install/garmin-grafana-install.sh: fix local outside function, add tarball mode - install/ente-install.sh: uncomment cleanup_lxc - install/github-runner-install.sh: add missing , fix msg_info text - ct/step-ca.sh: remove duplicate success message - ct/devuan.sh, ct/ubuntu.sh: apt-get -> apt, remove duplicate msg_ok
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Thieneret
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
|
||||
@@ -29,8 +29,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Devuan LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Devuan LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /var ]]; then
|
||||
if [[ ! -d /opt/ente ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Ente LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Ente LXC"
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_nesting="${var_nesting:-1}"
|
||||
@@ -39,7 +39,7 @@ function update_script() {
|
||||
|
||||
RELEASE=$(curl -fsSL https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+' | sed 's/^v//')
|
||||
msg_info "Updating Forgejo Runner to v${RELEASE}"
|
||||
curl -fsSL "https://code.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-linux-amd64" -o forgejo-runner
|
||||
curl -fsSL "https://code.forgejo.org/forgejo/runner/releases/download/v${RELEASE}/forgejo-runner-linux-amd64" -o /usr/local/bin/forgejo-runner
|
||||
chmod +x /usr/local/bin/forgejo-runner
|
||||
msg_ok "Updated Forgejo Runner"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ function update_script() {
|
||||
cp -r /opt/garmin-grafana/.garminconnect /opt/garmin-grafana-tokens.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "garmin-grafana" "arpanghosh8453/garmin-grafana"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "garmin-grafana" "arpanghosh8453/garmin-grafana" "tarball"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
cp /opt/garmin-grafana.env.bak /opt/garmin-grafana/.env
|
||||
|
||||
@@ -41,21 +41,22 @@ function update_script() {
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Invidious" "iv-org/invidious" "tarball" "latest" "/opt/invidious"
|
||||
if check_for_gh_release "Invidious-Companion" "iv-org/invidious-companion"; then
|
||||
CLEAN_INSTALL fetch_and_deploy_gh_release "Invidious-Companion" "iv-org/invidious-companion" "prebuild" "latest" "/opt/invidious-companion" "invidious_companion-x86_64-unknown-linux-gnu.tar.gz"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Invidious-Companion" "iv-org/invidious-companion" "prebuild" "latest" "/opt/invidious-companion" "invidious_companion-x86_64-unknown-linux-gnu.tar.gz"
|
||||
fi
|
||||
|
||||
msg_info "Updating Invidious"
|
||||
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)"
|
||||
cd /opt/oxicloud
|
||||
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud"
|
||||
export RUSTFLAGS="-C target-cpu=native"
|
||||
$STD cargo build --release
|
||||
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud
|
||||
msg_ok "Updated Invidious"
|
||||
msg_info "Rebuilding Invidious"
|
||||
cd /opt/invidious
|
||||
$STD make
|
||||
msg_ok "Rebuilt Invidious"
|
||||
|
||||
msg_info "Starting Invidious"
|
||||
$STD systemctl start oxicloud
|
||||
msg_ok "Started Invidious"
|
||||
msg_info "Restoring config"
|
||||
cp /opt/invidious-config.yml /opt/invidious/config/config.yml
|
||||
rm -f /opt/invidious-config.yml
|
||||
msg_ok "Restored config"
|
||||
|
||||
msg_info "Starting services"
|
||||
$STD systemctl start invidious invidious-companion
|
||||
msg_ok "Started services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -sSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: BillyOutlast
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
@@ -25,6 +25,11 @@ function update_script() {
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/localagi ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "localagi" "mudler/LocalAGI"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop localagi
|
||||
|
||||
@@ -35,9 +35,8 @@ function update_script() {
|
||||
|
||||
if check_for_gh_release "step-badger" "lukasz-lobocki/step-badger"; then
|
||||
fetch_and_deploy_gh_release "step-badger" "lukasz-lobocki/step-badger" "prebuild" "latest" "/opt/step-badger" "step-badger_Linux_x86_64.tar.gz"
|
||||
msg_ok "Updated successfully!"
|
||||
msg_ok "Updated step-badger"
|
||||
fi
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,9 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating Ubuntu LXC"
|
||||
$STD apt-get update
|
||||
$STD apt-get -y upgrade
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated Ubuntu LXC"
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
@@ -350,4 +350,4 @@ msg_ok "Created helper scripts"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
#cleanup_lxc
|
||||
cleanup_lxc
|
||||
|
||||
@@ -54,7 +54,7 @@ msg_ok "Installed Grafana"
|
||||
|
||||
msg_info "Configuring Grafana"
|
||||
GRAFANA_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||
local retries=0
|
||||
retries=0
|
||||
while ! grafana-cli admin reset-admin-password "${GRAFANA_PASS}" &>/dev/null; do
|
||||
((retries++))
|
||||
[[ $retries -ge 30 ]] && break
|
||||
@@ -64,7 +64,7 @@ $STD grafana-cli plugins install marcusolsson-hourly-heatmap-panel
|
||||
$STD systemctl restart grafana-server
|
||||
msg_ok "Configured Grafana"
|
||||
|
||||
fetch_and_deploy_gh_release "garmin-grafana" "arpanghosh8453/garmin-grafana"
|
||||
fetch_and_deploy_gh_release "garmin-grafana" "arpanghosh8453/garmin-grafana" "tarball"
|
||||
|
||||
msg_info "Configuring garmin-grafana"
|
||||
mkdir -p /opt/garmin-grafana/.garminconnect
|
||||
|
||||
@@ -12,8 +12,8 @@ network_check
|
||||
update_os
|
||||
|
||||
|
||||
msg_info "Install Dependencies"
|
||||
apt install -y \
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
git \
|
||||
gh
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
@@ -72,12 +72,11 @@ msg_ok "Migrated database"
|
||||
|
||||
msg_info "Configuring services"
|
||||
sed -e 's|=invidious|=root|' \
|
||||
-e 's|/home|/opt|' /opt/invidious.service /etc/systemd/system/invidious.service
|
||||
-e 's|/home|/opt|' /opt/invidious.service >/etc/systemd/system/invidious.service
|
||||
curl -fsSL https://github.com/iv-org/invidious-companion/raw/refs/heads/master/invidious-companion.service -o /etc/systemd/system/invidious-companion.service
|
||||
sed -i -e "s|CHANGE_ME$|${SECRET_KEY}|" \
|
||||
-e 's|=invidious$|=root|' \
|
||||
-e 's|/home|/opt|' /etc/systemd/system/invidious_companion.service
|
||||
systemctl daemon-reload
|
||||
-e 's|/home|/opt|' /etc/systemd/system/invidious-companion.service
|
||||
systemctl -q enable --now invidious invidious-companion
|
||||
msg_ok "Configured services"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user