fixes
This commit is contained in:
parent
2018921f92
commit
a22b7492c5
@ -14,22 +14,41 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y --no-install-recommends \
|
||||||
ffmpeg \
|
assimp-utils \
|
||||||
jq
|
calibre \
|
||||||
|
dcraw \
|
||||||
|
dvisvgm \
|
||||||
|
ffmpeg \
|
||||||
|
ghostscript \
|
||||||
|
graphicsmagick \
|
||||||
|
imagemagick-7.q16 \
|
||||||
|
inkscape \
|
||||||
|
libheif-examples \
|
||||||
|
libjxl-tools \
|
||||||
|
libva2 \
|
||||||
|
libvips-tools \
|
||||||
|
lmodern \
|
||||||
|
mupdf-tools \
|
||||||
|
pandoc \
|
||||||
|
poppler-utils \
|
||||||
|
potrace \
|
||||||
|
python3-numpy \
|
||||||
|
resvg \
|
||||||
|
texlive \
|
||||||
|
texlive-fonts-recommended \
|
||||||
|
texlive-latex-extra \
|
||||||
|
texlive-latex-recommended \
|
||||||
|
texlive-xetex
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing ConvertX"
|
setup_nodejs NODE_VERSION=22 NODE_MODULE="bun"
|
||||||
curl -fsSL "https://bun.sh/install" | bash
|
fetch_and_deploy_gh_release "ConvertX" "C4illin/ConvertX" "tarball" "latest" "/opt/convertx"
|
||||||
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
|
|
||||||
mkdir -p /opt/convertx
|
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/C4illin/ConvertX/releases/latest | jq -r .tag_name | sed 's/^v//')
|
msg_info "Installing ConvertX"
|
||||||
curl -fsSL -o "/opt/convertx/ConvertX-${RELEASE}.tar.gz" "https://github.com/C4illin/ConvertX/archive/refs/tags/v${RELEASE}.tar.gz"
|
|
||||||
tar --strip-components=1 -xf "/opt/convertx/ConvertX-${RELEASE}.tar.gz" -C /opt/convertx
|
|
||||||
cd /opt/convertx
|
cd /opt/convertx
|
||||||
mkdir -p data
|
mkdir -p data
|
||||||
bun install
|
$STD bun install
|
||||||
|
|
||||||
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32)
|
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32)
|
||||||
cat <<EOF >/opt/convertx/.env
|
cat <<EOF >/opt/convertx/.env
|
||||||
@ -59,8 +78,11 @@ systemctl enable -q --now convertx
|
|||||||
msg_ok "Service Created"
|
msg_ok "Service Created"
|
||||||
|
|
||||||
msg_info "Waiting for SQLite database"
|
msg_info "Waiting for SQLite database"
|
||||||
for ((COUNT=0; COUNT<60; COUNT++)); do
|
for ((COUNT = 0; COUNT < 60; COUNT++)); do
|
||||||
[ -f "/opt/convertx/data/mydb.sqlite" ] && { systemctl restart convertx; exit 0; }
|
[ -f "/opt/convertx/data/mydb.sqlite" ] && {
|
||||||
|
systemctl restart convertx
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
msg_error "Timed out waiting for database!"
|
msg_error "Timed out waiting for database!"
|
||||||
@ -71,7 +93,6 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD rm -f /opt/convertx/ConvertX-${RELEASE}.tar.gz
|
|
||||||
$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