Compare commits

..

No commits in common. "03e8b1dbae9f739bbcd9897237d72d3868df3d16" and "5c7da4f2f9a1f990a413647fdb90670ae162c348" have entirely different histories.

3 changed files with 19 additions and 23 deletions

View File

@ -1,11 +1,12 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2024 community-scripts ORG
# Author: davalanche
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/mylar3/mylar3
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
function header_info {
clear
cat <<"EOF"
@ -56,17 +57,7 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/mylar3 ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | jq -r '.tag_name')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to ${RELEASE}"
rm -rf /opt/mylar3/* /opt/mylar3/.*
wget -qO- https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz | tar -xz --strip-components=1 -C /opt/mylar3
systemctl restart mylar3
echo "${RELEASE}" > /opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
msg_error "${APP} should be updated via the user interface."
exit
}

View File

@ -19,26 +19,20 @@ $STD apt-get install -y \
curl \
sudo \
mc \
jq
git \
python3-pip
echo "deb http://deb.debian.org/debian bookworm non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.list
$STD apt-get update
$STD apt-get install -y unrar
rm /etc/apt/sources.list.d/non-free.list
msg_ok "Installed Dependencies"
msg_info "Updating Python3"
$STD apt-get install -y python3-pip
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
$STD pip install -U --no-cache-dir pip
msg_ok "Updated Python3"
msg_info "Installing ${APPLICATION}"
mkdir -p /opt/mylar3
mkdir -p /opt/mylar3-data
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | jq -r '.tag_name')
wget -qO- https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz | tar -xz --strip-components=1 -C /opt/mylar3
$STD git clone -b master https://github.com/mylar3/mylar3.git /opt/mylar3
$STD pip install -U --no-cache-dir pip
$STD pip install --no-cache-dir -r /opt/mylar3/requirements.txt
echo "${RELEASE}" > /opt/${APPLICATION}_version.txt
msg_ok "Installed ${APPLICATION}"
msg_info "Creating Service"
@ -59,6 +53,12 @@ EOF
systemctl enable -q --now mylar3.service
msg_ok "Created Service"
msg_info "Updating ${APPLICATION} configuration"
# version detection and updates through the user interface do not currently work unless "check_github_on_startup = True"
sed -i -e 's/check_github_on_startup = False/check_github_on_startup = True/' -e 's/check_github = False/check_github = True/' /opt/mylar3-data/config.ini
systemctl restart mylar3
msg_ok "${APPLICATION} configuration updated"
motd_ssh
customize

View File

@ -30,5 +30,10 @@
"username": null,
"password": null
},
"notes": []
"notes": [
{
"text": "Mylar3 can be updated via the user interface.",
"type": "info"
}
]
}