mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-23 10:23:00 +01:00
Kometa: optimize config.yml sed patterns, add Quickstart integration (#13198)
* 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>
This commit is contained in:
committed by
GitHub
parent
00faa7a937
commit
7a2c754cea
@@ -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}"
|
||||
|
||||
@@ -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 <<EOF >/etc/systemd/system/kometa.service
|
||||
@@ -46,7 +54,22 @@ RestartSec=30
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now kometa
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user