#! /bin/sh
###############################
#          2013-11-19         #
#        author jackluo       #
#      net.webjoy@gmail.com   #
###############################
serverid=$1 #服务器的id
api_url=$2  #API服务器的url地址
api_file_path=/home/wwwroot/cy/application/config/server_lists_config.php #文件的url 路径
if [ -z "${serverid}" ] || [ -z "${api_url}" ];then
    echo "你要提供两个参数第一个是serverid第二个是api_url地址 不够"
    exit
fi
sed -i '$d'  ${api_file_path} #删除最后一行
echo "                        '${serverid}'=> array(
                                        'KEY' => "passed",
                                        'MAIL_GIFT_URL' => 'http://${api_url}/mailgift',
                                        'SEND_NOTICE_URL' => 'http://${api_url}/broadcast',
                                        'GM_TOOLS_URL' =>'http://${api_url}/ban'
                                  ),
        );" >> ${api_file_path}
sed -i 's/\r//' ${api_file_path}

 

相关文章:

  • 2021-07-27
  • 2021-06-29
  • 2022-12-23
  • 2022-01-01
  • 2021-09-16
  • 2022-12-23
  • 2021-04-04
  • 2022-01-01
猜你喜欢
  • 2021-10-14
  • 2021-05-24
  • 2022-01-20
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
相关资源
相似解决方案