From 7a2c754cea75f72c9133382117c055feb4e876b5 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 23 Mar 2026 09:14:15 +0100 Subject: [PATCH] Kometa: optimize config.yml sed patterns, add Quickstart integration (#13198) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(kometa): fix config.yml sed patterns, add Quickstart integration - Fix sed commands for plex token and tmdb apikey (empty values in template, not hash placeholders) - Use section-aware sed to avoid replacing wrong token/apikey fields - Add Kometa Quickstart web UI on port 7171 * Enhance kometa-install.sh for virtualenv and services Updated the installation script to include a virtual environment setup and modified service enabling commands. * Update install/kometa-install.sh Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --------- Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/kometa.sh | 4 ++-- install/kometa-install.sh | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ct/kometa.sh b/ct/kometa.sh index 2789e4ea1..72618bb82 100644 --- a/ct/kometa.sh +++ b/ct/kometa.sh @@ -61,5 +61,5 @@ description msg_ok "Completed successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" -echo -e "${INFO}${YW} Access the LXC at following IP address:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}${IP}${CL}" +echo -e "${INFO}${YW} Access Kometa Quickstart:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7171${CL}" diff --git a/install/kometa-install.sh b/install/kometa-install.sh index f944985a2..e633c6e16 100644 --- a/install/kometa-install.sh +++ b/install/kometa-install.sh @@ -23,12 +23,20 @@ mkdir -p config/assets cp config/config.yml.template config/config.yml msg_ok "Setup Kometa" -read -p "${TAB3}Enter your TMDb API key: " TMDBKEY -read -p "${TAB3}Enter your Plex URL: " PLEXURL -read -p "${TAB3}Enter your Plex token: " PLEXTOKEN -sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL #g" /opt/kometa/config/config.yml -sed -i -e "s/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml -sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/g" /opt/kometa/config/config.yml +read -r -p "${TAB3}Enter your TMDb API key: " TMDBKEY +read -r -p "${TAB3}Enter your Plex URL: " PLEXURL +read -r -p "${TAB3}Enter your Plex token: " PLEXTOKEN +sed -i '/^plex:/,/^[^ ]/{s| url:.*| url: '"$PLEXURL"'|}' /opt/kometa/config/config.yml +sed -i '/^plex:/,/^[^ ]/{s| token:.*| token: '"$PLEXTOKEN"'|}' /opt/kometa/config/config.yml +sed -i '/^tmdb:/,/^[^ ]/{s| apikey:.*| apikey: '"$TMDBKEY"'|}' /opt/kometa/config/config.yml + +fetch_and_deploy_gh_release "kometa-quickstart" "Kometa-Team/Quickstart" "tarball" + +msg_info "Installing Kometa Quickstart" +cd /opt/kometa-quickstart +$STD uv venv /opt/kometa-quickstart/.venv +$STD /opt/kometa-quickstart/.venv/bin/python -m pip install -r requirements.txt +msg_ok "Installed Kometa Quickstart" msg_info "Creating Service" cat </etc/systemd/system/kometa.service @@ -46,7 +54,22 @@ RestartSec=30 [Install] WantedBy=multi-user.target EOF -systemctl enable -q --now kometa +cat </etc/systemd/system/kometa-quickstart.service +[Unit] +Description=Kometa Quickstart +After=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/kometa-quickstart +ExecStart=/opt/kometa-quickstart/.venv/bin/python quickstart.py +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now kometa kometa-quickstart msg_ok "Created Service" motd_ssh