mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-24 19:03:00 +01:00
* 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>
78 lines
2.1 KiB
Bash
78 lines
2.1 KiB
Bash
#!/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://github.com/Kometa-Team/Kometa
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
PYTHON_VERSION="3.13" setup_uv
|
|
fetch_and_deploy_gh_release "kometa" "Kometa-Team/Kometa" "tarball"
|
|
|
|
msg_info "Setup Kometa"
|
|
cd /opt/kometa
|
|
$STD uv pip install -r requirements.txt --system
|
|
mkdir -p config/assets
|
|
cp config/config.yml.template config/config.yml
|
|
msg_ok "Setup Kometa"
|
|
|
|
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 <<EOF >/etc/systemd/system/kometa.service
|
|
[Unit]
|
|
Description=Kometa Service
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/opt/kometa
|
|
ExecStart=/usr/bin/python3 kometa.py
|
|
Restart=always
|
|
RestartSec=30
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
cat <<EOF >/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
|
|
customize
|
|
cleanup_lxc
|