Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk 55427e1202 teslamate: use precompiled Elixir 1.20 (otp-27), apt's 1.18.3 is too old for 4.1.1 2026-08-16 20:36:58 +02:00
9 changed files with 66 additions and 138 deletions
-2
View File
@@ -530,8 +530,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- [FIX] Shelfmark: internal bypasser never starts under the gevent worker [@robbiet480](https://github.com/robbiet480) ([#16495](https://github.com/community-scripts/ProxmoxVE/pull/16495))
- tubearchivist: fix: enhance update script [@CrazyWolf13](https://github.com/CrazyWolf13) ([#16521](https://github.com/community-scripts/ProxmoxVE/pull/16521))
- tracktor: build with pnpm using upstream's frozen lockfile [@MickLesk](https://github.com/MickLesk) ([#16530](https://github.com/community-scripts/ProxmoxVE/pull/16530))
- wallos: run db migration after apache reload on update [@MickLesk](https://github.com/MickLesk) ([#16528](https://github.com/community-scripts/ProxmoxVE/pull/16528))
+2 -10
View File
@@ -36,18 +36,9 @@ function update_script() {
if check_for_gh_release "shelfmark" "calibrain/shelfmark"; then
msg_info "Stopping Service(s)"
systemctl stop shelfmark
[[ -f /etc/systemd/system/chromium.service ]] && systemctl stop chromium
msg_ok "Stopped Service(s)"
if [[ $(sed -n '/_BYPASS=/s/[^=]*=//p' /etc/shelfmark/.env) == "true" ]] &&
[[ $(sed -n '/BYPASSER=/s/[^=]*=//p' /etc/shelfmark/.env) == "false" ]]; then
msg_info "Updating internal bypasser configuration"
systemctl disable -q --now chromium 2>/dev/null || true
rm -f /etc/systemd/system/chromium.service
systemctl daemon-reload
sed -i '/DOCKERMODE=/s/false/true/' /etc/shelfmark/.env
msg_ok "Updated internal bypasser configuration"
fi
[[ -f /etc/systemd/system/flaresolverr.service ]] && if check_for_gh_release "flaresolverr" "Flaresolverr/Flaresolverr"; then
msg_info "Stopping FlareSolverr service"
systemctl stop flaresolverr
@@ -88,6 +79,7 @@ function update_script() {
msg_info "Starting Service(s)"
systemctl start shelfmark
[[ -f /etc/systemd/system/chromium.service ]] && systemctl start chromium
msg_ok "Started Service(s)"
msg_ok "Updated successfully!"
fi
+10
View File
@@ -35,6 +35,16 @@ function update_script() {
systemctl stop teslamate
msg_ok "Stopped Service"
if [[ ! -d /opt/elixir ]]; then
msg_info "Migrating to newer Elixir (required by TeslaMate)"
$STD apt remove -y elixir
fetch_and_deploy_gh_release "elixir" "elixir-lang/elixir" "prebuild" "latest" "/opt/elixir" "elixir-otp-27.zip"
for bin in elixir elixirc iex mix; do
ln -sf "/opt/elixir/bin/$bin" "/usr/local/bin/$bin"
done
msg_ok "Migrated to newer Elixir"
fi
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "teslamate" "teslamate-org/teslamate" "tarball"
msg_info "Building TeslaMate (Patience)"
+3 -14
View File
@@ -35,10 +35,7 @@ function update_script() {
systemctl stop tubearchivist tubearchivist-celery tubearchivist-beat
msg_ok "Stopped Services"
create_backup \
/opt/tubearchivist/.env \
/opt/tubearchivist/cache \
/opt/tubearchivist/backend/run.sh
create_backup /opt/tubearchivist/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tubearchivist" "tubearchivist/tubearchivist" "tarball"
@@ -51,8 +48,6 @@ function update_script() {
mkdir -p /opt/tubearchivist/backend/static
cp -r /opt/tubearchivist/frontend/dist/* /opt/tubearchivist/backend/static/
cp /opt/tubearchivist/docker_assets/backend_start.py /opt/tubearchivist/backend/
rm -rf /opt/tubearchivist/.venv
$STD uv venv /opt/tubearchivist/.venv --python 3.13
$STD uv pip install --python /opt/tubearchivist/.venv/bin/python -r /opt/tubearchivist/backend/requirements.txt
if [[ -f /opt/tubearchivist/backend/requirements.plugins.txt ]]; then
mkdir -p /opt/yt_plugins/bgutil
@@ -64,14 +59,8 @@ function update_script() {
sed -i 's|^TA_APP_DIR=/opt/tubearchivist$|TA_APP_DIR=/opt/tubearchivist/backend|' /opt/tubearchivist/.env
sed -i 's|^TA_CACHE_DIR=/opt/tubearchivist/cache$|TA_CACHE_DIR=/cache|' /opt/tubearchivist/.env
sed -i 's|^TA_MEDIA_DIR=/opt/tubearchivist/media$|TA_MEDIA_DIR=/youtube|' /opt/tubearchivist/.env
ln -sfn /opt/tubearchivist/cache /cache
# /youtube may already be a user-managed Proxmox bind mount. Only create the symlink if nothing is there
if [[ ! -e /youtube ]]; then
mkdir -p /opt/tubearchivist/media
ln -sfn /opt/tubearchivist/media /youtube
elif ! mountpoint -q /youtube && [[ ! -L /youtube ]]; then
msg_error "/youtube exists but is neither a mount nor a symlink - check manually"
fi
ln -sf /opt/tubearchivist/cache /cache
ln -sf /opt/tubearchivist/media /youtube
ln -sf /opt/tubearchivist/.env /opt/tubearchivist/backend/.env
msg_ok "Restored Configuration"
+15 -75
View File
@@ -8,23 +8,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="Valkey"
var_tags="${var_tags:-database}"
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_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
if [[ -z "${var_os:-}" ]]; then
var_os=$(msg_menu "Choose the container OS" "debian" "Debian 13 (TLS supported)" "alpine" "Alpine 3.24 (smaller, no TLS)")
fi
if [[ "$var_os" == "alpine" ]]; then
var_ram="${var_ram:-256}"
var_disk="${var_disk:-1}"
var_version="${var_version:-3.24}"
else
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_version="${var_version:-13}"
fi
header_info "$APP"
variables
color
@@ -34,66 +24,16 @@ function update_script() {
header_info
check_container_storage
check_container_resources
IS_ALPINE=0
[[ -f /etc/alpine-release ]] && IS_ALPINE=1
if [[ "$IS_ALPINE" == "1" ]]; then
if [[ ! -f /etc/init.d/valkey ]]; then
msg_error "No Valkey Installation Found!"
exit
fi
else
if [[ ! -f /lib/systemd/system/valkey-server.service ]]; then
msg_error "No Valkey Installation Found!"
exit
fi
if [[ ! -f /lib/systemd/system/valkey-server.service ]]; then
msg_error "No Valkey Installation Found!"
exit
fi
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
CHOICE=$(msg_menu "Valkey Management" \
"1" "Update Valkey" \
"2" "Allow 0.0.0.0 for listening" \
"3" "Allow only ${LXCIP} for listening")
case $CHOICE in
1)
msg_info "Updating Valkey"
if [[ "$IS_ALPINE" == "1" ]]; then
apk update && apk upgrade valkey
rc-service valkey restart
else
$STD apt update
$STD apt -y upgrade
fi
msg_ok "Updated Valkey"
msg_ok "Updated successfully!"
exit
;;
2)
msg_info "Setting Valkey to listen on all interfaces"
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
if [[ "$IS_ALPINE" == "1" ]]; then
rc-service valkey restart
else
systemctl restart valkey-server
fi
msg_ok "Valkey now listens on all interfaces!"
exit
;;
3)
msg_info "Setting Valkey to listen only on ${LXCIP}"
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf
if [[ "$IS_ALPINE" == "1" ]]; then
rc-service valkey restart
else
systemctl restart valkey-server
fi
msg_ok "Valkey now listens only on ${LXCIP}!"
exit
;;
esac
msg_info "Updating Valkey LXC"
$STD apt update
$STD apt -y upgrade
msg_ok "Updated Valkey LXC"
msg_ok "Updated successfully!"
exit
}
start
@@ -102,5 +42,5 @@ description
msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Connect to Valkey CLI using the following command:${CL}"
echo -e "${GATEWAY}${BGN}valkey-cli -h ${IP} -p 6379${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:6379${CL}"
+16 -1
View File
@@ -116,7 +116,6 @@ else
chromium-common \
chromium \
python3-tk
sed -i '/DOCKERMODE=/s/false/true/' /etc/shelfmark/.env
msg_ok "Installed internal bypasser dependencies"
fi
@@ -166,6 +165,22 @@ KillMode=mixed
WantedBy=multi-user.target
EOF
if [[ "$DEPLOYMENT_TYPE" == "1" ]]; then
cat <<EOF >/etc/systemd/system/chromium.service
[Unit]
Description=Chromium Headless Browser
After=network.target
[Service]
User=root
ExecStart=/usr/bin/chromium --headless --no-sandbox --disable-gpu --disable-dev-shm-usage --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222 --hide-scrollbars
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now chromium
fi
if [[ "$DEPLOYMENT_TYPE" == "2" ]]; then
cat <<EOF >/etc/systemd/system/flaresolverr.service
[Unit]
+5 -1
View File
@@ -19,7 +19,6 @@ $STD apt install -y \
erlang \
erlang-dev \
erlang-syntax-tools \
elixir \
mosquitto \
locales
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen
@@ -27,6 +26,11 @@ $STD locale-gen
systemctl enable -q --now mosquitto
msg_ok "Installed Dependencies"
fetch_and_deploy_gh_release "elixir" "elixir-lang/elixir" "prebuild" "latest" "/opt/elixir" "elixir-otp-27.zip"
for bin in elixir elixirc iex mix; do
ln -sf "/opt/elixir/bin/$bin" "/usr/local/bin/$bin"
done
PG_VERSION="17" setup_postgresql
PG_DB_NAME="teslamate" PG_DB_USER="teslamate" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
NODE_VERSION="22" setup_nodejs
+12 -32
View File
@@ -13,23 +13,12 @@ setting_up_container
network_check
update_os
IS_ALPINE=0
[[ -f /etc/alpine-release ]] && IS_ALPINE=1
msg_info "Installing Valkey"
if [[ "$IS_ALPINE" == "1" ]]; then
$STD apk add valkey valkey-openrc valkey-cli
else
$STD apt update
$STD apt install -y valkey openssl
fi
$STD apt update
$STD apt install -y valkey openssl
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
if [[ "$IS_ALPINE" == "1" ]]; then
PASS="$(head -c 100 /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c32)"
else
PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)"
fi
PASS="$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | head -c32)"
echo "requirepass $PASS" >>/etc/valkey/valkey.conf
echo "$PASS" >~/valkey.creds
chmod 600 ~/valkey.creds
@@ -45,12 +34,9 @@ echo "maxmemory-policy allkeys-lru" >>/etc/valkey/valkey.conf
echo "maxmemory-samples 10" >>/etc/valkey/valkey.conf
msg_ok "Installed Valkey"
if [[ "$IS_ALPINE" == "1" ]]; then
msg_info "Skipping TLS (Alpine's valkey package is compiled without TLS support)"
else
echo
read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
echo
read -r -p "${TAB3}Enable TLS for Valkey (Sentinel mode does not supported)? [y/N]: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
read -r -p "${TAB3}Use TLS-only mode (disable TCP port 6379)? [y/N]: " tls_only
msg_info "Configuring TLS for Valkey..."
@@ -61,7 +47,7 @@ else
chown valkey:valkey "$TLS_CERT" "$TLS_KEY"
if [[ ${tls_only,,} =~ ^(y|yes)$ ]]; then
cat <<EOF >>/etc/valkey/valkey.conf
cat <<EOF >/etc/valkey/valkey.conf
# TLS configuration generated by Proxmox VE Valkey helper-script
port 0
@@ -70,9 +56,9 @@ tls-cert-file $TLS_DIR/valkey.crt
tls-key-file $TLS_DIR/valkey.key
tls-auth-clients no
EOF
msg_ok "Enabled TLS-only mode on port 6379"
msg_ok "Enabled TLS-only mode on port 6379"
else
cat <<EOF >>/etc/valkey/valkey.conf
cat <<EOF >/etc/valkey/valkey.conf
# TLS configuration generated by Proxmox VE Valkey helper-script
tls-port 6380
@@ -80,18 +66,12 @@ tls-cert-file $TLS_DIR/valkey.crt
tls-key-file $TLS_DIR/valkey.key
tls-auth-clients no
EOF
msg_ok "Enabled TLS on port 6380 and TCP on 6379"
msg_ok "Enabled TLS on port 6380 and TCP on 6379"
fi
fi
fi
if [[ "$IS_ALPINE" == "1" ]]; then
$STD rc-update add valkey default
$STD rc-service valkey start
else
systemctl enable -q --now valkey-server
systemctl restart valkey-server
fi
systemctl enable -q --now valkey-server
systemctl restart valkey-server
motd_ssh
customize
+3 -3
View File
@@ -2542,7 +2542,7 @@ _deploy_source_tarball() {
mkdir -p "$target"
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf --
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
fi
tar --no-same-owner -xzf "$tarball" -C "$workdir" || {
@@ -2631,7 +2631,7 @@ _deploy_unpacked_archive() {
# was truncated, the archive was unreadable, or it unpacked to nothing.
mkdir -p "$target"
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf --
find "${target:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
fi
if ! cp -r "$source_dir"/* "$target/"; then
@@ -9372,7 +9372,7 @@ fetch_and_deploy_from_url() {
mkdir -p "$directory"
if [[ "${CLEAN_INSTALL:-0}" == "1" ]]; then
find "${directory:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -print0 | xargs -0 rm -rf --
find "${directory:?}" -mindepth 1 \( -type d -exec mountpoint -q {} \; -prune \) -o -delete
fi
local unpack_tmp