PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin;

#info
function amh_module_info()
{
	  
		echo 'AMH-ModuleName: Shadowsocks';
		echo 'AMH-ModuleDescription: Shadowsocks - AMH面板SS备份模块。本模块使用于：CentOS，Debian，Ubuntu),启动：/etc/init.d/shadowsocks status，停止：/etc/init.d/shadowsocks stop，重启：/etc/init.d/shadowsocks restart，状态：/etc/init.d/shadowsocks status';
		echo 'AMH-ModuleButton: 安装/卸载';
		echo 'AMH-ModuleDate: 2017-04-22';
		echo 'AMH-ModuleAdmin: ';
		echo 'AMH-ModuleWebSite: http://www.Sxsay.com';
		echo 'AMH-ModuleIco: http://www.sxsay.com/amh/modules/SS/shadowsocks.png';
		echo 'AMH-ModuleScriptBy: Lovees';
}
#install
function amh_module_install()
{
    if amh_module_status ; then
    	exit;
    else     
	        bash /root/amh/modules/Shadowsocks/SH/install.sh;
	        echo "";
		amh_module_status;
    fi;
}
#admin
function amh_module_admin()
{
    if amh_module_status ; then
		echo '[OK] Shadowsocks No management options. ';
	else
		exit;
	fi;
}
#uninstall
function amh_module_uninstall()
{
    if amh_module_status ; then     
        bash /root/amh/modules/Shadowsocks/SH/uninstall.sh;
        echo '[OK] Shadowsocks uninstall success!';
    else
    	exit;
    fi;

}
#status
function amh_module_status()
{
        if [ -f /etc/init.d/shadowsocks ]; then
            echo "Shadowsocks start success!";
			return 0;
        else
            echo "Shadowsocks start failed!";
			return 1;
        fi;
}


