#!/bin/sh
PROTOCOL=$1
DOMAIN=$2

modify_api()
{
	URI_PREFIX=$1
	cat > abvw/common/json/sys/conf.json << EOF
{
        "apiUrl"              : "$URI_PREFIX/{0}/abvapi",
        "apiLoginUrl"         : "$URI_PREFIX/nuabvapi",
        "apiResourceDlUrl"    : "$URI_PREFIX/{0}/dl",
        "bookShelfCount"      : 15,
        "bookListCount"       : 15,
        "screenlockTimeDefault" : 30,
        "pushPageCount"       : 5,
        "pushTimePeriod"      : 60,
        "debug"               : true,
        "loginPage"           : "index.html",
        "anonymousLoginFlg"   : false,
        "anonymousLoginPath"  : "test",
        "anonymousLoginId"    : "nologin",
        "appName"             : "ABookWebCL",
        "appVersion"          : "0.0.1"
}
EOF
}

modify_api "$PROTOCOL://$DOMAIN/acms"

