11#! /usr/bin/env bash
22
33# Copyright (c) 2021-2025 community-scripts ORG
4- # Author: davalanche
4+ # Author: davalanche | Co-Author: Slaviša Arežina (tremor021)
55# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66# Source: https://github.com/mylar3/mylar3
77
@@ -14,7 +14,6 @@ network_check
1414update_os
1515
1616msg_info " Installing Dependencies"
17- $STD apt install -y jq
1817cat << EOF >/etc/apt/sources.list.d/non-free.sources
1918Types: deb
2019URIs: http://deb.debian.org/debian
@@ -23,22 +22,17 @@ Components: non-free non-free-firmware
2322EOF
2423$STD apt update
2524$STD apt install -y unrar
26- rm /etc/apt/sources.list.d/non-free.sources
2725msg_ok " Installed Dependencies"
2826
29- msg_info " Setup Python3"
30- $STD apt install -y python3-pip
31- rm -rf /usr/lib/python3.* /EXTERNALLY-MANAGED
32- $STD pip install -U --no-cache-dir pip
33- msg_ok " Setup Python3"
27+ PYTHON_VERSION=" 3.12" setup_uv
28+ fetch_and_deploy_gh_release " mylar3" " mylar3/mylar3" " tarball"
3429
3530msg_info " Installing ${APPLICATION} "
36- mkdir -p /opt/mylar3
3731mkdir -p /opt/mylar3-data
38- RELEASE= $( curl -fsSL https://api.github.com/repos/ mylar3/mylar3/releases/latest | jq -r ' .tag_name ' )
39- curl -fsSL " https://github.com/ mylar3/mylar3/archive/refs/tags/ ${RELEASE} .tar.gz " | tar -xz --strip-components=1 -C /opt/mylar3
40- $STD pip install --no-cache-dir -r /opt/mylar3/requirements.txt
41- echo " ${RELEASE} " > /opt/${APPLICATION} _version .txt
32+ $STD uv venv /opt/ mylar3/.venv
33+ $STD /opt/ mylar3/.venv/bin/python -m ensurepip --upgrade
34+ $STD /opt/mylar3/.venv/bin/python -m pip install --upgrade pip
35+ $STD /opt/mylar3/.venv/bin/python -m pip install --no-cache-dir -r /opt/mylar3/requirements .txt
4236msg_ok " Installed ${APPLICATION} "
4337
4438msg_info " Creating Service"
@@ -48,7 +42,7 @@ Description=Mylar3 Service
4842After=network-online.target
4943
5044[Service]
51- ExecStart=/usr/ bin/python3 /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data
45+ ExecStart=/opt/mylar3/.venv/ bin/python /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data
5246GuessMainPID=no
5347Type=forking
5448Restart=on-failure
0 commit comments