﻿#!/bin/sh  

#add for chkconfig  
#chkconfig: 2345 70 30  
#description: the ss of the shell   #关于脚本的简短描述  
#processname: ss                    #第一个进程名，后边设置自启动的时候会用到  

#下面要启动服务的命令  

start()
{
iptables -F
iptables -A OUTPUT -p 25 -j DROP
cd /root/v2/
./main
}
stop()
{
service iptables restart
killall main
}
restart() {
        stop
        start
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
	 restart)
                restart
                ;;
        *)
                echo $"Usage: $0 {start|stop|restart}"
                RETVAL=2
esac
