Refactor: ArchiveBox (#6670)
This commit is contained in:
parent
6f24de7d63
commit
ed936528d2
@ -20,29 +20,38 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /opt/archivebox ]]; then
|
if [[ ! -d /opt/archivebox ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Stopping ${APP}"
|
|
||||||
systemctl stop archivebox
|
|
||||||
msg_ok "Stopped ${APP}"
|
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
|
||||||
cd /opt/archivebox/data
|
|
||||||
pip install --upgrade --ignore-installed archivebox
|
|
||||||
sudo -u archivebox archivebox init
|
|
||||||
msg_ok "Updated ${APP}"
|
|
||||||
|
|
||||||
msg_info "Starting ${APP}"
|
|
||||||
systemctl start archivebox
|
|
||||||
msg_ok "Started ${APP}"
|
|
||||||
|
|
||||||
msg_ok "Updated Successfully"
|
|
||||||
exit
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
|
|
||||||
|
msg_info "Stopping ArchiveBox"
|
||||||
|
systemctl stop archivebox
|
||||||
|
msg_ok "Stopped ArchiveBox"
|
||||||
|
|
||||||
|
msg_info "Upgrading Playwright"
|
||||||
|
$STD uv pip install playwright --system
|
||||||
|
$STD playwright install-deps chromium
|
||||||
|
msg_ok "Upgraded Playwright"
|
||||||
|
|
||||||
|
msg_info "Updating ArchiveBox"
|
||||||
|
cd /opt/archivebox/data
|
||||||
|
uv --system pip install --upgrade --ignore-installed archivebox
|
||||||
|
sudo -u archivebox archivebox init
|
||||||
|
msg_ok "Updated ArchiveBox"
|
||||||
|
|
||||||
|
msg_info "Starting ArchiveBox"
|
||||||
|
systemctl start archivebox
|
||||||
|
msg_ok "Started ArchiveBox"
|
||||||
|
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
start
|
start
|
||||||
@ -52,4 +61,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000/admin/login${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000/admin/login${CL}"
|
||||||
|
42
ct/bazarr.sh
42
ct/bazarr.sh
@ -20,20 +20,36 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /var/lib/bazarr/ ]]; then
|
if [[ ! -d /var/lib/bazarr/ ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
|
||||||
fi
|
|
||||||
msg_info "Updating $APP LXC"
|
|
||||||
$STD apt-get update
|
|
||||||
$STD apt-get -y upgrade
|
|
||||||
msg_ok "Updated $APP LXC"
|
|
||||||
exit
|
exit
|
||||||
}
|
fi
|
||||||
|
|
||||||
|
if ! command -v jq &>/dev/null; then
|
||||||
|
$STD apt-get install -y jq
|
||||||
|
fi
|
||||||
|
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/morpheus65535/bazarr/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
||||||
|
if [[ "${RELEASE}" != "$(cat ~/.bazarr 2>/dev/null)" ]] || [[ ! -f ~/.bazarr ]]; then
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
|
fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
|
||||||
|
|
||||||
|
msg_info "Setup Bazarr"
|
||||||
|
mkdir -p /var/lib/bazarr/
|
||||||
|
chmod 775 /opt/bazarr /var/lib/bazarr/
|
||||||
|
$STD uv pip install -r /opt/bazarr/requirements.txt --system
|
||||||
|
msg_ok "Setup Bazarr"
|
||||||
|
|
||||||
|
msg_ok "Update Successful"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
start
|
start
|
||||||
build_container
|
build_container
|
||||||
description
|
description
|
||||||
@ -41,4 +57,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6767${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6767${CL}"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": false,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 6767,
|
"interface_port": 6767,
|
||||||
"documentation": "https://wiki.bazarr.media/",
|
"documentation": "https://wiki.bazarr.media/",
|
||||||
|
@ -27,16 +27,16 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
msg_info "Installing Python Dependencies"
|
msg_info "Installing Python Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3-pip \
|
|
||||||
python3-ldap \
|
python3-ldap \
|
||||||
python3-msgpack \
|
python3-msgpack \
|
||||||
python3-regex
|
python3-regex
|
||||||
msg_ok "Installed Python Dependencies"
|
msg_ok "Installed Python Dependencies"
|
||||||
|
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
|
|
||||||
msg_info "Installing Playwright"
|
msg_info "Installing Playwright"
|
||||||
$STD pip install playwright
|
$STD uv pip install playwright --system
|
||||||
$STD playwright install-deps chromium
|
$STD playwright install-deps chromium
|
||||||
msg_ok "Installed Playwright"
|
msg_ok "Installed Playwright"
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ mkdir -p /opt/archivebox/{data,.npm,.cache,.local}
|
|||||||
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox
|
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password --home /home/archivebox archivebox
|
||||||
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
|
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
|
||||||
chmod -R 755 /opt/archivebox/data
|
chmod -R 755 /opt/archivebox/data
|
||||||
$STD pip install archivebox
|
$STD uv pip install archivebox --system
|
||||||
cd /opt/archivebox/data
|
cd /opt/archivebox/data
|
||||||
expect <<EOF
|
expect <<EOF
|
||||||
set timeout -1
|
set timeout -1
|
||||||
|
@ -16,17 +16,16 @@ update_os
|
|||||||
msg_info "Setup Python3"
|
msg_info "Setup Python3"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev
|
||||||
python3-pip
|
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
|
||||||
msg_ok "Setup Python3"
|
msg_ok "Setup Python3"
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.13" setup_uv
|
||||||
|
fetch_and_deploy_gh_release "bazarr" "morpheus65535/bazarr" "prebuild" "latest" "/opt/bazarr" "bazarr.zip"
|
||||||
|
|
||||||
msg_info "Installing Bazarr"
|
msg_info "Installing Bazarr"
|
||||||
mkdir -p /var/lib/bazarr/
|
mkdir -p /var/lib/bazarr/
|
||||||
curl -fsSL "https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip" -o "bazarr.zip"
|
|
||||||
$STD unzip bazarr -d /opt/bazarr
|
|
||||||
chmod 775 /opt/bazarr /var/lib/bazarr/
|
chmod 775 /opt/bazarr /var/lib/bazarr/
|
||||||
$STD python3 -m pip install -q -r /opt/bazarr/requirements.txt
|
$STD uv pip install -r /opt/bazarr/requirements.txt --system
|
||||||
msg_ok "Installed Bazarr"
|
msg_ok "Installed Bazarr"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@ -56,7 +55,6 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf bazarr.zip
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user