Watch 1 Star 0 Fork 61

小时候就很厉害 / MLSBSGPL-2.0

forked from MickeyBeeHome / MLSBS 
Clone or download
myscript.sh
Copy Edit Web IDE Raw Normal History
mickey_zzc   integration 2014-05-06
#!/bin/bashPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binexport PATHclear;#获取脚本路劲ScriptPath=$(cd $(dirname "$0") && pwd)
mickey_zzc   update readme 2014-05-06
#加载配置内容
mickey_zzc   integration 2014-05-06
source $ScriptPath/config#检测脚本文件是否存在并加载
mickey_zzc   update readme 2014-05-06
SOURCE_SCRIPT(){
蓝宝石的傻话   fix 2014-05-09
if [ ! -f "$1" ]; then	echo -e "not exist $1,so $0 can not be supported!"
mickey_zzc   integration 2014-05-06
	exit 1else
蓝宝石的傻话   fix 2014-05-09
	echo -e "loading $1 now, continue ......"	source $1
mickey_zzc   integration 2014-05-06
fi}#mainSELECT_RUN_SCRIPT(){	clear;
蓝宝石的傻话   fix 2014-05-09
	SOURCE_SCRIPT $FunctionPath/system_base_set.sh
mickey_zzc   integration 2014-05-06
	echo "[Notice] Which function you want to run:"
mickey_zzc   add cron create & add ssh backlist deny 2014-05-12
	select var in "Initialize System" "Install nginx" "Install tomcat" "Install Mysql" "Setup firewall" "Install Puppet" "create cron" "Exit";do
mickey_zzc   integration 2014-05-06
		case $var in			"Initialize System")				SELECT_SYSTEM_BASE_FUNCTION;;			"Install nginx")
蓝宝石的傻话   fix 2014-05-09
				SOURCE_SCRIPT $FunctionPath/nginx_install.sh
mickey_zzc   integration 2014-05-06
				NGINX_VAR && SELECT_NGINX_FUNCTION;;			"Install tomcat")
蓝宝石的傻话   fix 2014-05-09
				SOURCE_SCRIPT $FunctionPath/tomcat_install.sh
mickey_zzc   integration 2014-05-06
				TOMCAT_VAR && SELECT_TOMCAT_FUNCTION;;			"Install Mysql")
蓝宝石的傻话   fix 2014-05-09
				SOURCE_SCRIPT $FunctionPath/mysql_install.sh
mickey_zzc   integration 2014-05-06
				MYSQL_VAR && MYSQL_BASE_PACKAGES_INSTALL && INSTALL_MYSQL;;			"Setup firewall")				if [ ${SysVer%%.*} -eq 3 -a ${SysVer##*.} -ge 13 ];then
蓝宝石的傻话   fix 2014-05-06
					echo "wait my script update"
mickey_zzc   integration 2014-05-06
				elif [ ${SysVer%%.*} -eq 2 -o ${SysVer%%.*} -eq 3 -a ${SysVer##*.} -le 12 ];then
蓝宝石的傻话   fix 2014-05-09
					SOURCE_SCRIPT $FunctionPath/iptables_set.sh
蓝宝石的傻话   fix 2014-05-06
					SELECT_IPTABLES_FUNCTION
mickey_zzc   integration 2014-05-06
				else					echo "your system is no supported my firewall script"				fi;;			"Install Puppet")
蓝宝石的傻话   fix 2014-05-09
				SOURCE_SCRIPT $FunctionPath/puppet_install.sh
mickey_zzc   integration 2014-05-06
				PUPPET_VAR && SELECT_PUPPET_FUNCTION;;
mickey_zzc   add cron create & add ssh backlist deny 2014-05-12
			"create cron")				SOURCE_SCRIPT $FunctionPath/create_cron.sh				SELECT_CRON_FUNCTION;;
mickey_zzc   integration 2014-05-06
			"Exit")				exit 0;;			*)				SELECT_RUN_SCRIPT;;		esac		break	done	SELECT_RUN_SCRIPT}
蓝宝石的傻话   fix 2014-05-06
SELECT_RUN_SCRIPT
1
https://gitee.com/smallsong/MLSBS.git
git@gitee.com:smallsong/MLSBS.git
smallsong
MLSBS
MLSBS
master

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542