Update paperless-ngx-update.sh

check dependencies
This commit is contained in:
tteckster 2022-12-22 08:26:16 -05:00 committed by GitHub
parent 1b1f7bd51f
commit da7741e0f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,8 @@ sleep 1
msg_ok "Stopped Paperless-ngx" msg_ok "Stopped Paperless-ngx"
msg_info "Updating to ${RELEASE}" msg_info "Updating to ${RELEASE}"
if [ "$(dpkg -l | awk '/libmariadb-dev/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev; fi &>/dev/null
if [ "$(dpkg -l | awk '/libmariadb-dev-compat/ {print }'|wc -l)" != 1 ]; then apt-get install libmariadb-dev-compat; fi &>/dev/null
wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null wget https://github.com/paperless-ngx/paperless-ngx/releases/download/$RELEASE/paperless-ngx-$RELEASE.tar.xz &>/dev/null
tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null tar -xf paperless-ngx-$RELEASE.tar.xz &>/dev/null
cp -r /opt/paperless/paperless.conf paperless-ngx/ cp -r /opt/paperless/paperless.conf paperless-ngx/