Skip to content

Commit d3a4f4f

Browse files
committed
Update stirling-pdf.sh
1 parent 5b446e6 commit d3a4f4f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

ct/stirling-pdf.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,16 @@ function update_script() {
2929
fi
3030
RELEASE=$(curl -fsSL https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
3131
if [[ "${RELEASE}" != "$(cat ~/.stirling-pdf 2>/dev/null)" ]] || [[ ! -f ~/.stirling-pdf ]]; then
32+
if [[ ! -f /etc/systemd/system/unoserver.service ]]; then
33+
msg_custom "⚠️ " "\e[33m" "Legacy installation detected – please recreate the container using the latest install script."
34+
exit 0
35+
fi
36+
37+
PYTHON_VERSION="3.12" setup_uv
38+
JAVA_VERSION="21" setup_java
3239

3340
msg_info "Stopping Services"
34-
systemctl stop stirlingpdf
35-
systemctl list-units --full -all | grep -q libreoffice-listener.service && systemctl stop libreoffice-listener
36-
systemctl list-units --full -all | grep -q unoserver.service && systemctl stop unoserver
41+
systemctl stop stirlingpdf libreoffice-listener unoserver
3742
msg_ok "Stopped Services"
3843

3944
if [[ -f ~/.Stirling-PDF-login ]]; then
@@ -48,9 +53,7 @@ function update_script() {
4853
msg_ok "Font Cache Updated"
4954

5055
msg_info "Starting Services"
51-
systemctl start stirlingpdf
52-
systemctl list-unit-files | grep -q libreoffice-listener.service && systemctl start libreoffice-listener
53-
systemctl list-unit-files | grep -q unoserver.service && systemctl start unoserver
56+
systemctl start stirlingpdf libreoffice-listener unoserver
5457
msg_ok "Started Services"
5558

5659
msg_ok "Update Successful"

0 commit comments

Comments
 (0)