Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
c04bf486
Commit
c04bf486
authored
Jul 27, 2019
by
Junling Bu
Browse files
chore: 利用ShellCheck修改sh脚本
parent
af880c98
Changes
2
Hide whitespace changes
Inline
Side-by-side
deploy/bin/reset.sh
View file @
c04bf486
...
...
@@ -15,17 +15,17 @@ PASSWORD=
if
test
-z
"
$PASSWORD
"
then
echo
"请设置云主机MySQL的root账号密码"
exit
-
1
exit
1
fi
# 导入数据
cd
/home/ubuntu/deploy/db
cd
/home/ubuntu/deploy/db
||
exit
2
mysql
-h
localhost
-u
$ROOT
-p
$PASSWORD
< litemall.sql
# 删除storage文件夹内文件
cd
/home/ubuntu/deploy/litemall/storage
cd
/home/ubuntu/deploy/litemall/storage
||
exit
2
rm
-f
./
**
# 重新部署服务
cd
/home/ubuntu/deploy/bin
cd
/home/ubuntu/deploy/bin
||
exit
2
sudo
./deploy.sh
\ No newline at end of file
deploy/util/lazy.sh
View file @
c04bf486
...
...
@@ -15,26 +15,26 @@ ID_RSA=
if
test
-z
"
$REMOTE
"
then
echo
"请设置云主机登录IP地址和账户"
exit
-
1
exit
1
fi
if
test
-z
"
$ID_RSA
"
then
echo
"请设置云主机登录IP地址和账户"
exit
-
1
exit
1
fi
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null
&&
pwd
)
"
cd
$DIR
/../..
cd
$DIR
/../..
||
exit
2
LITEMALL_HOME
=
$PWD
echo
"LITEMALL_HOME
$LITEMALL_HOME
"
# 项目打包
cd
$LITEMALL_HOME
cd
$LITEMALL_HOME
||
exit
2
./deploy/util/package.sh
# 上传云主机
cd
$LITEMALL_HOME
cd
$LITEMALL_HOME
||
exit
2
scp
-i
$ID_RSA
-r
./deploy
$REMOTE
:/home/ubuntu/
# 远程登录云主机并执行reset脚本
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment