mirror of https://github.com/tteck/Proxmox.git
Update stirlingpdf-install.sh
- Create a symbolic link from `/opt/Stirling-PDF/Stirling-PDF-*.jar` to `/opt/Stirling-PDF/Stirling-PDF.jar` to ensure that the `stirlingpdf.service` file doesn't have to be updated after each upgrade. - Show installed version
This commit is contained in:
parent
1789d7af21
commit
cd1b7a4c64
|
@ -80,7 +80,10 @@ mkdir -p /opt/Stirling-PDF
|
||||||
touch /opt/Stirling-PDF/.env
|
touch /opt/Stirling-PDF/.env
|
||||||
mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/
|
mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/
|
||||||
mv scripts /opt/Stirling-PDF/
|
mv scripts /opt/Stirling-PDF/
|
||||||
msg_ok "Installed Stirling-PDF"
|
latest_version=$(ls -1 /opt/Stirling-PDF/Stirling-PDF-*.jar | sort -V | tail -n 1)
|
||||||
|
ln -s "$latest_version" /opt/Stirling-PDF/Stirling-PDF.jar
|
||||||
|
current_version=$(echo "$latest_version" | grep -oP '(?<=Stirling-PDF-)\d+(\.\d+)+(?=\.jar)')
|
||||||
|
msg_ok "Installed Stirling-PDF version $current_version"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/stirlingpdf.service
|
cat <<EOF >/etc/systemd/system/stirlingpdf.service
|
||||||
|
@ -97,7 +100,7 @@ Group=root
|
||||||
Type=simple
|
Type=simple
|
||||||
EnvironmentFile=/opt/Stirling-PDF/.env
|
EnvironmentFile=/opt/Stirling-PDF/.env
|
||||||
WorkingDirectory=/opt/Stirling-PDF
|
WorkingDirectory=/opt/Stirling-PDF
|
||||||
ExecStart=/usr/bin/java -jar Stirling-PDF-0.19.0.jar
|
ExecStart=/usr/bin/java -jar Stirling-PDF.jar
|
||||||
ExecStop=/bin/kill -15 %n
|
ExecStop=/bin/kill -15 %n
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -110,7 +113,7 @@ motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb
|
# cd ~ && rm -rf Stirling-PDF configs customFiles logs zulu-repo_1.0.0-3_all.deb
|
||||||
$STD apt-get autoremove
|
$STD apt-get autoremove
|
||||||
$STD apt-get autoclean
|
$STD apt-get autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|
Loading…
Reference in New Issue