Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
8b059db0e9 fix(termix): fix nginx pid path and log paths on update (#14410)
- Replace outdated 'pid /app/nginx' deletion with proper replacement
  of 'pid /tmp/nginx/nginx.pid;' -> 'pid /run/nginx.pid;'
- Add sed to redirect error_log from /tmp/nginx/ to /var/log/nginx/
- Add sed to redirect access_log from /tmp/nginx/ to /var/log/nginx/

Fixes: nginx: open() '/tmp/nginx/nginx.pid' failed (2: No such file or directory)
2026-05-11 20:14:12 +02:00
6 changed files with 9 additions and 183 deletions

View File

@@ -472,12 +472,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- core: support optional POST_INSTALL_SCRIPT (var_post_install_script) hook [@MickLesk](https://github.com/MickLesk) ([#14160](https://github.com/community-scripts/ProxmoxVE/pull/14160))
### 🧰 Tools
- #### 💥 Breaking Changes
- fix: qbittorrent-exporter for 5.2 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#14403](https://github.com/community-scripts/ProxmoxVE/pull/14403))
## 2026-05-10
### 🚀 Updated Scripts

View File

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

View File

@@ -1,73 +0,0 @@
#!/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: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/LycheeOrg/Lychee
APP="Lychee"
var_tags="${var_tags:-media;photos;gallery}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
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 [[ ! -d /opt/lychee ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "lychee" "LycheeOrg/Lychee"; then
msg_info "Stopping Services"
systemctl stop caddy
msg_ok "Stopped Services"
msg_info "Backing up Data"
cp /opt/lychee/.env /opt/lychee.env.bak
cp -r /opt/lychee/storage /opt/lychee_storage_backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip"
msg_info "Restoring Data"
cp /opt/lychee.env.bak /opt/lychee/.env
rm -f /opt/lychee.env.bak
cp -r /opt/lychee_storage_backup/. /opt/lychee/storage
rm -rf /opt/lychee_storage_backup
msg_ok "Restored Data"
msg_info "Updating Application"
cd /opt/lychee
$STD php artisan migrate --force
$STD php artisan optimize:clear
chmod -R 775 /opt/lychee/storage /opt/lychee/bootstrap/cache
msg_ok "Updated Application"
msg_info "Starting Services"
systemctl start caddy
msg_ok "Started Services"
msg_ok "Updated successfully!"
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}${CL}"

View File

@@ -199,7 +199,9 @@ EOF
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
curl -fsSL "https://raw.githubusercontent.com/Termix-SSH/Termix/main/docker/nginx.conf" -o /etc/nginx/nginx.conf
sed -i '/^master_process/d' /etc/nginx/nginx.conf
sed -i '/^pid \/app\/nginx/d' /etc/nginx/nginx.conf
sed -i 's|pid /tmp/nginx/nginx.pid;|pid /run/nginx.pid;|' /etc/nginx/nginx.conf
sed -i 's|error_log /tmp/nginx/error.log|error_log /var/log/nginx/error.log|' /etc/nginx/nginx.conf
sed -i 's|access_log /tmp/nginx/access.log|access_log /var/log/nginx/access.log|' /etc/nginx/nginx.conf
sed -i 's|/app/html|/opt/termix/html|g' /etc/nginx/nginx.conf
sed -i 's|/app/nginx|/opt/termix/nginx|g' /etc/nginx/nginx.conf
sed -i 's|listen ${PORT};|listen 80;|g' /etc/nginx/nginx.conf

View File

@@ -1,75 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/LycheeOrg/Lychee
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
caddy \
libimage-exiftool-perl \
jpegoptim
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ldap,exif,gd,intl,imagick,redis,zip,pdo_pgsql,pcntl" setup_php
PG_VERSION="16" setup_postgresql
PG_DB_NAME="lychee" PG_DB_USER="lychee" setup_postgresql_db
setup_ffmpeg
setup_imagemagick
fetch_and_deploy_gh_release "lychee" "LycheeOrg/Lychee" "prebuild" "latest" "/opt/lychee" "Lychee.zip"
msg_info "Configuring Application"
cd /opt/lychee
cp .env.example .env
APP_KEY=$($STD php artisan key:generate --show)
sed -i "s|^APP_KEY=.*|APP_KEY=${APP_KEY}|" .env
sed -i "s|^APP_ENV=.*|APP_ENV=production|" .env
sed -i "s|^APP_DEBUG=.*|APP_DEBUG=false|" .env
sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" .env
sed -i "s|^DB_CONNECTION=.*|DB_CONNECTION=pgsql|" .env
sed -i "s|^DB_HOST=.*|DB_HOST=127.0.0.1|" .env
sed -i "s|^DB_PORT=.*|DB_PORT=5432|" .env
sed -i "s|^#\?DB_DATABASE=.*|DB_DATABASE=${PG_DB_NAME}|" .env
sed -i "s|^DB_USERNAME=.*|DB_USERNAME=${PG_DB_USER}|" .env
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" .env
mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache public/dist public/uploads public/sym
touch public/dist/user.css public/dist/custom.js
chmod -R 775 storage bootstrap/cache public/dist public/uploads public/sym
msg_ok "Configured Application"
msg_info "Running Database Migrations"
cd /opt/lychee
$STD php artisan migrate --force
msg_ok "Ran Database Migrations"
chown -R www-data:www-data /opt/lychee
msg_info "Configuring Caddy"
PHP_VER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
cat <<EOF >/etc/caddy/Caddyfile
:80 {
root * /opt/lychee/public
php_fastcgi unix//run/php/php${PHP_VER}-fpm.sock
file_server
encode gzip
}
EOF
usermod -aG www-data caddy
msg_ok "Configured Caddy"
systemctl enable -q --now php${PHP_VER}-fpm
systemctl restart caddy
motd_ssh
customize
cleanup_lxc

View File

@@ -68,24 +68,6 @@ function uninstall() {
# ==============================================================================
function update() {
if check_for_gh_release "qbittorrent-exporter" "martabal/qbittorrent-exporter"; then
if [[ "$(printf '%s\n' "2.0.0" "$CHECK_UPDATE_RELEASE" | sort -V | tail -n1)" == "$CHECK_UPDATE_RELEASE" ]] && \
! grep -q "QBITTORRENT_API_KEY" "$CONFIG_PATH" 2>/dev/null; then
echo ""
msg_warn "Version 2.0.0 introduces a breaking change: username/password login has been replaced by an API key."
echo -e "${TAB3}${INFO} You must create an API key in qBittorrent under Tools > Options > Web UI > API key"
echo ""
echo -n "${TAB3}Enter your qBittorrent API key (or press Enter to abort): "
read -r QBITTORRENT_API_KEY
if [[ -z "$QBITTORRENT_API_KEY" ]]; then
msg_warn "No API key provided. Update aborted."
exit 0
fi
sed -i '/^QBITTORRENT_USERNAME=/d' "$CONFIG_PATH"
sed -i '/^QBITTORRENT_PASSWORD=/d' "$CONFIG_PATH"
echo "QBITTORRENT_API_KEY=\"${QBITTORRENT_API_KEY}\"" >>"$CONFIG_PATH"
msg_ok "API key saved to configuration"
fi
msg_info "Stopping service"
if [[ "$OS" == "Alpine" ]]; then
rc-service qbittorrent-exporter stop &>/dev/null
@@ -118,9 +100,10 @@ function update() {
# INSTALL
# ==============================================================================
function install() {
read -erp "${TAB3}Enter URL of qBittorrent, example: (http://127.0.0.1:8080): " QBITTORRENT_BASE_URL
echo -e "${TAB3}${INFO} Create an API key in qBittorrent under Tools > Options > Web UI > API key"
read -erp "${TAB3}Enter qBittorrent API key: " QBITTORRENT_API_KEY
read -erp "Enter URL of qBittorrent, example: (http://127.0.0.1:8080): " QBITTORRENT_BASE_URL
read -erp "Enter qBittorrent username: " QBITTORRENT_USERNAME
read -rsp "Enter qBittorrent password: " QBITTORRENT_PASSWORD
printf "\n"
fetch_and_deploy_gh_release "qbittorrent-exporter" "martabal/qbittorrent-exporter" "tarball" "latest"
setup_go
@@ -133,7 +116,8 @@ function install() {
cat <<EOF >"$CONFIG_PATH"
# https://github.com/martabal/qbittorrent-exporter?tab=readme-ov-file#parameters
QBITTORRENT_BASE_URL="${QBITTORRENT_BASE_URL}"
QBITTORRENT_API_KEY="${QBITTORRENT_API_KEY}"
QBITTORRENT_USERNAME="${QBITTORRENT_USERNAME}"
QBITTORRENT_PASSWORD="${QBITTORRENT_PASSWORD}"
EOF
msg_ok "Created configuration"