From 1068827ea0aeb29543ca4feb9a395ad88fd5d395 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Nov 2022 13:15:52 -0500 Subject: [PATCH] Update paperless-ngx-update.sh fix paperless-task-queue.service stop --- misc/paperless-ngx-update.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/misc/paperless-ngx-update.sh b/misc/paperless-ngx-update.sh index 509067bc..752c4376 100644 --- a/misc/paperless-ngx-update.sh +++ b/misc/paperless-ngx-update.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash clear RELEASE=$(curl -s https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +SER=/etc/systemd/system/paperless-task-queue.service YW=$(echo "\033[33m") RD=$(echo "\033[01;31m") BL=$(echo "\033[36m") @@ -49,7 +50,10 @@ while true; do done sleep 2 msg_info "Stopping Paperless-ngx" -systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service +systemctl stop paperless-consumer paperless-webserver paperless-scheduler +if [ -f "$SER" ]; then + systemctl stop paperless-task-queue.service +fi sleep 1 msg_ok "Stopped Paperless-ngx" @@ -63,7 +67,6 @@ sed -i -e 's|-e git+https://github.com/paperless-ngx/django-q.git|git+https://gi pip install -r requirements.txt &>/dev/null cd /opt/paperless/src /usr/bin/python3 manage.py migrate &>/dev/null -SER=/etc/systemd/system/paperless-task-queue.service if [ -f "$SER" ]; then msg_ok "paperless-task-queue.service Exists." else