forked from centos-bz/ezhttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
61 lines (56 loc) · 1.64 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#===============================================================================
# SYSTEM REQUIRED: Linux
# DESCRIPTION: automatic deploy your linux
# AUTHOR: Zhu Maohai.
# website: http://www.centos.bz/ezhttp/
#===============================================================================
cur_dir=`pwd`
#载入函数
load_functions(){
local function=$1
if [[ -s $cur_dir/function/${function}.sh ]];then
. $cur_dir/function/${function}.sh
else
echo "$cur_dir/function/${function}.sh not found,shell can not be executed."
exit 1
fi
}
#配置linux
main(){
#开始载入
load_functions config
load_functions public
load_functions apache
load_functions depends
load_functions mysql
load_functions nginx
load_functions other-soft
load_functions php
load_functions php-modules
load_functions tools
load_functions other
load_functions upgrade
#创建记录安装路径信息文件
touch /etc/ezhttp_info_do_not_del
#不允许删除,只允许追加
chattr +a /etc/ezhttp_info_do_not_del
clear
echo "#############################################################################"
echo
echo "You are welcome to use this script to deploy your linux,hope you like."
echo "The script is written by Zhu Maohai."
echo "If you have any question."
echo "please visit http://www.centos.bz/ezhttp/ and submit your issue.thank you."
echo
echo "############################################################################"
echo
need_root_priv
load_config
pre_setting
}
########从这里开始运行程序######
rm -f /root/ezhttp.log
main 2>&1 | tee -a /root/ezhttp.log