Update paperless-ngx-update.sh

fix paperless-task-queue.service stop
pull/803/head
tteckster 2022-11-29 13:15:52 -05:00 committed by GitHub
parent 3f01bfcf31
commit 1068827ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -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