#!/bin/bash
# Author:  EinicYeo <einicyeo AT gmail.com>
# BLOG:  https://www.infvie.com
#
# Notes: EnvoyinStack for CentOS/RedHat 6+

DEMO() {
  pushd ${envoyinstack_dir}/src > /dev/null
  if [ ! -e ${wwwroot_dir}/default/index.html ]; then 
    [ "${IPADDR_COUNTRY}"x == "CN"x ] && /bin/cp ${envoyinstack_dir}/config/index_cn.html ${wwwroot_dir}/default/index.html || /bin/cp ${envoyinstack_dir}/config/index.html ${wwwroot_dir}/default
  fi
  chown -R ${run_user}.${run_user} ${wwwroot_dir}/default
  [ -e /bin/systemctl ] && systemctl daemon-reload
  popd > /dev/null
}
