Compare commits

...

7 Commits

Author SHA1 Message Date
tteckster 1789d7af21
Update stirlingpdf-install.sh
tweak
2024-01-07 20:42:08 -05:00
tteckster 3ea4ec656b
Update CHANGELOG.md 2024-01-07 19:21:20 -05:00
tteckster 7cf643abe7
Update stirlingpdf-install.sh
tweak
2024-01-07 16:58:09 -05:00
tteckster 034f6d6537
Update stirlingpdf-install.sh
tweak
2024-01-07 16:44:58 -05:00
tteckster 1bd7b6f757
Update stirlingpdf.sh 2024-01-07 16:24:48 -05:00
tteckster d11f090507
Create stirlingpdf.sh 2024-01-07 16:08:46 -05:00
tteckster 10809204a8
Create stirlingpdf-install.sh 2024-01-07 16:07:51 -05:00
3 changed files with 184 additions and 0 deletions

View File

@ -11,6 +11,8 @@
### Changed
- **Stirling-PDF LXC**
- NEW Script
- **SFTPGo LXC**
- NEW Script

66
ct/stirlingpdf.sh Normal file
View File

@ -0,0 +1,66 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info {
clear
cat <<"EOF"
_____ __ _ ___ ____ ____ ______
/ ___// /_(_)____/ (_)___ ____ _ / __ \/ __ \/ ____/
\__ \/ __/ / ___/ / / __ \/ __ `/___/ /_/ / / / / /_
___/ / /_/ / / / / / / / / /_/ /___/ ____/ /_/ / __/
/____/\__/_/_/ /_/_/_/ /_/\__, / /_/ /_____/_/
/____/
EOF
}
header_info
echo -e "Loading..."
APP="StirlingPDF"
var_disk="8"
var_cpu="2"
var_ram="2048"
var_os="debian"
var_version="12"
variables
color
catch_errors
function default_settings() {
CT_TYPE="1"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8080 ${CL} \n"

View File

@ -0,0 +1,116 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
curl \
sudo \
mc \
git \
automake \
autoconf \
libtool \
libleptonica-dev \
pkg-config \
zlib1g-dev \
make \
g++ \
unpaper \
ocrmypdf
msg_ok "Installed Dependencies"
msg_info "Installing LibreOffice Components"
$STD apt-get install -y \
libreoffice-writer \
libreoffice-calc \
libreoffice-impress
msg_ok "Installed LibreOffice Components"
msg_info "Installing Python Dependencies"
$STD apt-get install -y \
python3 \
python3-pip
$STD pip3 install \
uno \
opencv-python-headless \
unoconv \
pngquant \
WeasyPrint
msg_ok "Installed Python Dependencies"
msg_info "Installing Azul Zulu"
wget -qO /etc/apt/trusted.gpg.d/zulu-repo.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xB1998361219BD9C9"
wget -q https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
$STD dpkg -i zulu-repo_1.0.0-3_all.deb
$STD apt-get update
$STD apt-get -y install zulu17-jdk
msg_ok "Installed Azul Zulu"
msg_info "Installing JBIG2"
$STD git clone https://github.com/agl/jbig2enc /opt/jbig2enc
cd /opt/jbig2enc
$STD bash ./autogen.sh
$STD bash ./configure
$STD make
$STD make install
msg_ok "Installed JBIG2"
msg_info "Installing Language Packs (Patience)"
$STD apt-get install -y 'tesseract-ocr-*'
msg_ok "Installed Language Packs"
msg_info "Installing Stirling-PDF (Additional Patience)"
$STD git clone https://github.com/Stirling-Tools/Stirling-PDF.git
cd Stirling-PDF
chmod +x ./gradlew
$STD ./gradlew build
mkdir -p /opt/Stirling-PDF
touch /opt/Stirling-PDF/.env
mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/
mv scripts /opt/Stirling-PDF/
msg_ok "Installed Stirling-PDF"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/stirlingpdf.service
[Unit]
Description=Stirling-PDF service
After=syslog.target network.target
[Service]
SuccessExitStatus=143
User=root
Group=root
Type=simple
EnvironmentFile=/opt/Stirling-PDF/.env
WorkingDirectory=/opt/Stirling-PDF
ExecStart=/usr/bin/java -jar Stirling-PDF-0.19.0.jar
ExecStop=/bin/kill -15 %n
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now stirlingpdf.service
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"