File tree Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Expand file tree Collapse file tree 4 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 44CURRENT_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " ; pwd -P )
55source ${CURRENT_DIR} /../common/common.sh
66
7- [ $( id -u) != " 0" ] && { ansi -n --bg-red " 请用 root 账户执行本脚本" ; exit 1; }
7+ [ $( id -u) != " 0" ] && { ansi -n --bold -- bg-red " 请用 root 账户执行本脚本" ; exit 1; }
88
99MYSQL_ROOT_PASSWORD=` random_string`
1010
@@ -79,5 +79,6 @@ spinner_function install_others "===> 正在安装 Mysql / Nginx / Redis / Memca
7979spinner_function install_node_yarn " ===> 正在安装 Nodejs / Yarn" ${LOG_PATH}
8080spinner_function install_composer " ===> 正在安装 Composer" ${LOG_PATH}
8181
82- ansi --green -n " 安装完毕"
83- ansi --green " Mysql root 密码:" ; ansi -n --bg-yellow --black ${MYSQL_ROOT_PASSWORD}
82+ ansi --green --bold -n " 安装完毕"
83+ ansi --green --bold " Mysql root 密码:" ; ansi -n --bold --bg-yellow --black ${MYSQL_ROOT_PASSWORD}
84+ ansi --green --bold -n " 请手动执行 source ~/.bash_aliases 使 alias 指令生效。"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ source ${CURRENT_DIR}/../common/common.sh
77read -r -p " 请输入 Mysql root 密码:" MYSQL_ROOT_PASSWORD
88
99mysql --user=" root" --password=" ${MYSQL_ROOT_PASSWORD} " -e " quit" > /dev/null 2>&1 || {
10- ansi -n --bg-red " 密码不正确"
10+ ansi -n --bold -- bg-red " 密码不正确"
1111 exit 1
1212}
1313
@@ -34,7 +34,7 @@ if [[ CREATE_DB -eq 1 ]]; then
3434 mysql --user=" root" --password=" ${MYSQL_ROOT_PASSWORD} " -e " FLUSH PRIVILEGES;" > /dev/null 2>&1
3535fi
3636
37- ansi -n --green " 创建成功" ;
37+ ansi -n --bold -- green " 创建成功" ;
3838
39- ansi --green " 用户名:" ; ansi -n --bg-yellow --black ${MYSQL_NORMAL_USER}
40- ansi --green " 密码:" ; ansi -n --bg-yellow --black ${MYSQL_NORMAL_USER_PASSWORD}
39+ ansi --green --bold " 用户名:" ; ansi -n --bg-yellow --black ${MYSQL_NORMAL_USER}
40+ ansi --green --bold " 密码:" ; ansi -n --bg-yellow --black ${MYSQL_NORMAL_USER_PASSWORD}
Original file line number Diff line number Diff line change 44CURRENT_DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " ; pwd -P )
55source ${CURRENT_DIR} /../common/common.sh
66
7- [ $( id -u) != " 0" ] && { ansi -n --bg-red " 请用 root 账户执行本脚本" ; exit 1; }
7+ [ $( id -u) != " 0" ] && { ansi -n --bold -- bg-red " 请用 root 账户执行本脚本" ; exit 1; }
88
99read -r -p " 请输入项目名:" project
1010
1111[[ $project =~ ^[a-zA-Z\0 -9_\-\. ]+$ ]] || {
12- ansi -n --bg-red " 项目名包含非法字符"
12+ ansi -n --bold -- bg-red " 项目名包含非法字符"
1313 exit 1
1414}
1515
1616read -r -p " 请输入站点域名(多个域名用空格隔开):" domains
1717
1818project_dir=" /var/www/${project} "
1919
20- ansi -n --green " 域名列表:${domains} "
21- ansi -n --green " 项目名:${project} "
22- ansi -n --green " 项目目录:${project_dir} "
20+ ansi -n --bold -- green " 域名列表:${domains} "
21+ ansi -n --bold -- green " 项目名:${project} "
22+ ansi -n --bold -- green " 项目目录:${project_dir} "
2323
2424read -r -p " 是否确认? [y/N] " response
2525case " $response " in
2626 [yY][eE][sS]|[yY])
2727 ;;
2828 * )
29- ansi -n --bg-red " 用户取消"
29+ ansi -n --bold -- bg-red " 用户取消"
3030 exit 1
3131 ;;
3232esac
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ echo -e "${green}安装脚本位于: ${HOME}/laravel-ubuntu-init${nc}"
2424
2525[ $( id -u) != " 0" ] && {
2626 source ${HOME} /laravel-ubuntu-init/common/ansi.sh
27- ansi -n --bg-yellow " 发现当前账户并非 root,请用 root 账户执行安装脚本"
27+ ansi -n --bold --bg-yellow " 发现当前账户并非 root,请用 root 账户执行安装脚本"
28+ } || {
29+ bash ./laravel-ubuntu-init/16.04/install.sh
2830}
2931
3032cd - > /dev/null
You can’t perform that action at this time.
0 commit comments