Update convertx-install.sh

This commit is contained in:
CanbiZ 2025-06-25 14:10:22 +02:00
parent 6e0a6dc688
commit e29d4153a5

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG # Copyright (c) 2021-2025 community-scripts ORG
# Author: Omar Minaya # Author: Omar Minaya | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/C4illin/ConvertX # Source: https://github.com/C4illin/ConvertX
@ -13,29 +13,29 @@ setting_up_container
network_check network_check
update_os update_os
# setup_imagemagick setup_imagemagick
# msg_info "Installing Dependencies" msg_info "Installing Dependencies"
# $STD apt-get install -y \ $STD apt-get install -y \
# assimp-utils \ assimp-utils \
# calibre \ calibre \
# dcraw \ dcraw \
# dvisvgm \ dvisvgm \
# ffmpeg \ ffmpeg \
# inkscape \ inkscape \
# libva2 \ libva2 \
# libvips-tools \ libvips-tools \
# lmodern \ lmodern \
# mupdf-tools \ mupdf-tools \
# pandoc \ pandoc \
# poppler-utils \ poppler-utils \
# potrace \ potrace \
# python3-numpy \ python3-numpy \
# texlive \ texlive \
# texlive-fonts-recommended \ texlive-fonts-recommended \
# texlive-latex-extra \ texlive-latex-extra \
# texlive-latex-recommended \ texlive-latex-recommended \
# texlive-xetex texlive-xetex
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
NODE_VERSION=22 NODE_MODULE="bun" setup_nodejs NODE_VERSION=22 NODE_MODULE="bun" setup_nodejs
@ -54,36 +54,24 @@ PORT=3000
EOF EOF
msg_ok "Installed ConvertX" msg_ok "Installed ConvertX"
# msg_info "Creating Services" msg_info "Creating Services"
# cat <<EOF >/etc/systemd/system/convertx.service cat <<EOF >/etc/systemd/system/convertx.service
# [Unit] [Unit]
# Description=ConvertX File Converter Description=ConvertX File Converter
# After=network.target After=network.target
# [Service] [Service]
# Type=exec Type=exec
# WorkingDirectory=/opt/convertx WorkingDirectory=/opt/convertx
# EnvironmentFile=/opt/convertx/.env EnvironmentFile=/opt/convertx/.env
# ExecStart=/root/.bun/bin/bun dev ExecStart=/bin/bun dev
# Restart=always Restart=always
# [Install] [Install]
# WantedBy=multi-user.target WantedBy=multi-user.target
# EOF EOF
# systemctl enable -q --now convertx systemctl enable -q --now convertx
# msg_ok "Service Created" msg_ok "Service Created"
msg_info "Waiting for SQLite database"
for ((COUNT = 0; COUNT < 60; COUNT++)); do
[ -f "/opt/convertx/data/mydb.sqlite" ] && {
systemctl restart convertx
exit 0
}
sleep 0.5
done
msg_error "Timed out waiting for database!"
exit 1
msg_ok "Database created"
motd_ssh motd_ssh
customize customize