Merge pull request #353 from linuxserver/remove-updatenotification

Remove updatenotification
This commit is contained in:
Eric Nemchik 2023-08-14 22:16:03 -05:00 committed by GitHub
commit 679d4f2c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,11 +140,25 @@ else
echo "https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/files_locking_transactional.html"
fi
if (occ app:list --no-interaction | grep -q richdocumentscode) 2>/dev/null; then
echo "Removing CODE Server"
APP=$(occ app:list --no-interaction | grep richdocumentscode | awk -F ' ' '{print $2}' | tr -d ':')
occ app:remove --no-interaction "${APP}" 2>/dev/null
fi
# remove problematic apps
for APP in richdocumentscode updatenotification; do
if (occ app:list | grep -q " - ${APP}:") 2>/dev/null; then
echo "Removing ${APP}"
fi
APP_PATH=$(occ app:getpath "${APP}" 2>/dev/null)
if [ -z "${APP_PATH}" ] || [ ! -d "${APP_PATH}" ]; then
APP_PATH="/app/www/public/apps/${APP}"
fi
if [ -d "${APP_PATH}" ]; then
occ app:disable "${APP}" >/dev/null 2>&1
fi
APP_STATUS="$(occ config:app:get "${APP}" enabled 2>/dev/null)"
if [ "${APP_STATUS}" != "no" ] && [ -n "${APP_STATUS}" ]; then
occ config:app:set "${APP}" enabled --value="no" >/dev/null 2>&1
fi
occ app:remove "${APP}" >/dev/null 2>&1
rm -rf "${APP_PATH}"
done
# set data directory
if [ ! -s /config/www/nextcloud/config/config.php ]; then