#!/bin/sh

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

$DIR/stop.sh > /dev/null

export LD_LIBRARY_PATH=/usr/local/lib
ldconfig

cd $DIR/build/MediaForwardService
$DIR/build/MediaForwardService/MediaForwardService $DIR/setting/app.ini
