mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update paperless-ngx-update.sh
fix paperless-task-queue.service stop
This commit is contained in:
parent
3f01bfcf31
commit
1068827ea0
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
clear
|
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) }')
|
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")
|
YW=$(echo "\033[33m")
|
||||||
RD=$(echo "\033[01;31m")
|
RD=$(echo "\033[01;31m")
|
||||||
BL=$(echo "\033[36m")
|
BL=$(echo "\033[36m")
|
||||||
@ -49,7 +50,10 @@ while true; do
|
|||||||
done
|
done
|
||||||
sleep 2
|
sleep 2
|
||||||
msg_info "Stopping Paperless-ngx"
|
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
|
sleep 1
|
||||||
msg_ok "Stopped Paperless-ngx"
|
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
|
pip install -r requirements.txt &>/dev/null
|
||||||
cd /opt/paperless/src
|
cd /opt/paperless/src
|
||||||
/usr/bin/python3 manage.py migrate &>/dev/null
|
/usr/bin/python3 manage.py migrate &>/dev/null
|
||||||
SER=/etc/systemd/system/paperless-task-queue.service
|
|
||||||
if [ -f "$SER" ]; then
|
if [ -f "$SER" ]; then
|
||||||
msg_ok "paperless-task-queue.service Exists."
|
msg_ok "paperless-task-queue.service Exists."
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user