.net 启动脚本
#!/bin/bash
mydate=`date +%Y%m%d_%H%M%S`
myhomedir="/diyi/dev_gateway_all/dev_erpBusiness"
mylogdir="${myhomedir}/logs"
[ ! -d $mylogdir ] && mkdir $mylogdir
cd $myhomedir
nohup dotnet ./ErpBusiness.Api.dll urls=http://172.17.16.7:6204 >${mylogdir}/start_${mydate}.log 2>&1 &
.net停止脚本
#!/bin/bash
mydate=`date +%Y%m%d_%H%M%S`
mylogdir="/diyi/dev_gateway_all/dev_erpBusiness/logs"
mypid=`ps -ef |grep "ErpBusiness.Api.dll" |grep -v grep |awk '{print $2}'`
[ ! -d $mylogdir ] && mkdir $mylogdir
kill -9 $mypid >${mylogdir}/kill_${mydate}.log 2>&1