#!/usr/bin/bash

VAR=/var/log/x2gobroker/

if [ ! -f $VAR/access.log ]
then
> $VAR/access.log
fi

if [ ! -f $VAR/authservice.log ]
then
> $VAR/authservice.log
fi

if [ ! -f $VAR/broker.log ]
then
> $VAR/broker.log
fi

if [ ! -f $VAR/error.log ]
then
> $VAR/error.log
fi

if [ ! -f $VAR/loadchecker.log ]
then
> $VAR/loadchecker.log
fi

if [ ! -f $VAR/x2gobroker-authservice.stderr ]
then
> $VAR/x2gobroker-authservice.stderr
fi

if [ ! -f $VAR/x2gobroker-authservice.stdout ]
then
> $VAR/x2gobroker-authservice.stdout
fi

if [ ! -f $VAR/x2gobroker-daemon.stderr ]
then
> $VAR/x2gobroker-daemon.stderr
fi

if [ ! -f $VAR/x2gobroker-daemon.stdout ]
then
> $VAR/x2gobroker-daemon.stdout
fi

if [ ! -f $VAR/x2gobroker-loadchecker.stderr ]
then
> $VAR/x2gobroker-loadchecker.stderr
fi

if [ ! -f $VAR/x2gobroker-loadchecker.stdout ]
then
> $VAR/x2gobroker-loadchecker.stdout
fi

chown -R x2gobroker $VAR
chgrp -R x2gobroker $VAR