From 4abc8e41d8e7c982c707ca6841a4186e47b50a4b Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 5 Jul 2023 02:02:58 +0000 Subject: [PATCH] only chown if exists --- update.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index bebad055..f3cae42d 100644 --- a/update.sh +++ b/update.sh @@ -297,7 +297,10 @@ sudo chown ${USER}:${USER} -R ${SCRIPTS_DIR} sudo chown ${USER}:${USER} /var/log/celery sudo chown ${USER}:${USER} -R /etc/conf.d/ sudo chown ${USER}:${USER} -R /etc/letsencrypt -sudo chown ${USER}:${USER} -R /rmmbackups + +if [ -d /rmmbackups ]; then + sudo chown ${USER}:${USER} -R /rmmbackups +fi CHECK_CELERY_CONFIG=$(grep "autoscale=20,2" /etc/conf.d/celery.conf) if ! [[ $CHECK_CELERY_CONFIG ]]; then @@ -377,9 +380,6 @@ for i in nats nats-api rmm daphne celery celerybeat nginx; do sudo systemctl start ${i} done -sleep 1 -/rmm/api/env/bin/python /rmm/api/tacticalrmm/manage.py update_agents - CURRENT_MESH_VER=$(cd /meshcentral/node_modules/meshcentral && node -p -e "require('./package.json').version") if [[ "${CURRENT_MESH_VER}" != "${LATEST_MESH_VER}" ]] || [[ "$force" = true ]]; then printf >&2 "${GREEN}Updating meshcentral from ${CURRENT_MESH_VER} to ${LATEST_MESH_VER}${NC}\n"