一段unix的批处理脚本

#!/bin/sh
#停止imgr服务
imgr_conf -a stop -A test210
echo "/tstop complete."
#系统等待10秒
sleep 10
#启动imgr服务
imgr_conf -a start -A test210
echo "/tstart complete."

把这个文件放在/home/bv1to1/bin/下,也就是path下,赋予一定的权限。

#。。。相当于注释
imgr_conf -a stop -A test210。。。停止服务器的命令
echo "/tstop complete."。。。输出一段文字
sleep 10。。。等待10秒

基本就是这样,很酷阿,   以后只用敲im_start.sh就可以了。

你可能感兴趣的:(unix,服务器,脚本,path,im)