Mylar3 testing
This commit is contained in:
parent
161f77ddf1
commit
a0b4e0b5b8
43
ct/mylar3.sh
Normal file
43
ct/mylar3.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: davalanche
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mylar3/mylar3
|
||||
|
||||
APP="Mylar3"
|
||||
var_tags="${var_tags:-torrent;downloader;comic}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/mylar3 ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "mylar3" "mylar3/mylar3"; then
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "mylar3" "mylar3/mylar3" "tarball"
|
||||
systemctl restart mylar3
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8090${CL}"
|
||||
60
install/mylar3-install.sh
Normal file
60
install/mylar3-install.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: davalanche
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mylar3/mylar3
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y unrar
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt install -y python3-pip
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
setup_uv
|
||||
fetch_and_deploy_gh_release "mylar3" "mylar3/mylar3" "tarball"
|
||||
|
||||
msg_info "Installing ${APPLICATION}"
|
||||
mkdir -p /opt/mylar3-data
|
||||
$STD uv venv /opt/mylar3/.venv
|
||||
$STD /opt/mylar3/.venv/bin/python -m ensurepip --upgrade
|
||||
$STD /opt/mylar3/.venv/bin/python -m pip install --upgrade pip
|
||||
$STD /opt/mylar3/.venv/bin/python -m pip install --no-cache-dir -r /opt/mylar3/requirements.txt
|
||||
msg_ok "Installed ${APPLICATION}"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/mylar3.service
|
||||
[Unit]
|
||||
Description=Mylar3 Service
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/mylar3/.venv/bin/python /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data
|
||||
GuessMainPID=no
|
||||
Type=forking
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now mylar3
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt -y autoremove
|
||||
$STD apt -y autoclean
|
||||
$STD apt -y clean
|
||||
msg_ok "Cleaned"
|
||||
Loading…
x
Reference in New Issue
Block a user