#!/bin/sh
exec 1>&2

. /etc/inconcert/inconcert.conf
. /etc/inconcert/network.conf

NAME=googleplayproxy

if [ "$DEBUG" != 0 ]; then
  NAME=${NAME}_d
fi

exec $NAME                                															\
        --localIP $LOCAL_IP              				 											\
        --localPort $GOOGLEPLAYPROXY_LOCAL_PORT   													\
        --configIP $CONFIG_IP             															\
        --cluster $CLUSTER_ID             															\
		--configPort $CONFIG_PORT 																	\
        --apiUrl $GOOGLEPLAY_API_URL 																\
        --oauthApiUrl $GOOGLEPLAY_OAUTH_API_URL 													\
        --poolTime $GOOGLEPLAY_POLL_TIME 															\
        --reviewsPerRequest $GOOGLEPLAY_MAX_REVIEWS_PER_REQUEST										\
        --newReviewsExpirationDays $GOOGLEPLAY_NEW_REVIEWS_EXPIRATION_DAYS							\
        --reviewsPerAccount $GOOGLEPLAY_MAX_REVIEWS_PER_ACCOUNT 									\
        --reviewsPerAccountFull $GOOGLEPLAY_MAX_REVIEWS_PER_ACCOUNT_FULL 							\
        --normalPoolingsPerFull $GOOGLEPLAY_NORMAL_POOLINGS_PER_FULL 								\
        --queueSeconds $GOOGLEPLAY_QUEUE_SECONDS 													\
        --queueThreads $GOOGLEPLAY_QUEUE_MAX_THREADS												\
        --queueTimeBetweenEventsMs $GOOGLEPLAY_QUEUE_MS_BETWEEN_EVENTS 								\
        --webhooksProxy $GOOGLEPLAY_WEBHOOKS_PROXY
