Remove updatenotification

Signed-off-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
Eric Nemchik 2023-08-14 20:00:33 -05:00
parent d2fd6fc539
commit ea2517e26d
No known key found for this signature in database

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}")
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)"
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