#!/bin/sh
usage()
{
echo "Usage: 启动配置参数"
echo " 可定制参数 online or niusmallnan"
}
if (($# == 0))
then
usage
exit
fi
cd services
ps aux | grep msx_apns | grep -v 'grep' | awk '{print $2}' | xargs kill -s 9
case $1 in
online)
nohup ./msx_apns_service.py ../conf/apns_config_online.py > /dev/null &
;;
niusmallnan)
nohup mypython msx_apns_service.py ../conf/apns_config_niusmallnan.py > /dev/null &
;;
*)
usage
exit 0
esac
运行后有个小报错:
./apns_service.sh: 15: 0: not found
就是fi那行
但是即便如此 后面的语句也都执行了..
对shell不太熟..谁给看下