mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-23 07:29:02 +01:00
Update paperless-ngx.sh
add version check
This commit is contained in:
parent
d0439cde1c
commit
5204ad7e16
@ -66,6 +66,7 @@ function update_script() {
|
|||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
header_info
|
header_info
|
||||||
if [ "$UPD" == "1" ]; then
|
if [ "$UPD" == "1" ]; then
|
||||||
|
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||||
msg_info "Stopping all Paperless-ngx Services"
|
msg_info "Stopping all Paperless-ngx Services"
|
||||||
systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service
|
systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service
|
||||||
msg_ok "Stopped all Paperless-ngx Services"
|
msg_ok "Stopped all Paperless-ngx Services"
|
||||||
@ -93,6 +94,9 @@ function update_script() {
|
|||||||
sleep 1
|
sleep 1
|
||||||
msg_ok "Started all Paperless-ngx Services"
|
msg_ok "Started all Paperless-ngx Services"
|
||||||
msg_ok "Updated Successfully!\n"
|
msg_ok "Updated Successfully!\n"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ "$UPD" == "2" ]; then
|
if [ "$UPD" == "2" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user