#!/bin/bash
# Copyright (c) 2000-2018 Synology Inc. All rights reserved.
source "$(dirname $0)"/common
PrepareLockDir
${DB_TOOL} --init-config-if-needed
${DB_TOOL} --setup-db
${DB_TOOL} --upgrade-all-db
if [ -f ${PREUPGRADE_TMP_FILE} ] ; then
# it's upgrading from the other version
rm -f ${PREUPGRADE_TMP_FILE}
else
# it's a brand new install
${DB_TOOL} --grant-default-privilege
${DB_TOOL} --auto-bind
fi
exit 0