Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
abd20f31
Commit
abd20f31
authored
Apr 22, 2018
by
wojiushixiaobai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新升级脚本
parent
5c7acae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
upgrade.sh
utils/upgrade.sh
+15
-2
No files found.
utils/upgrade.sh
View file @
abd20f31
#!/bin/bash
#!/bin/bash
if
[
!
-d
"/opt/py3"
]
;
then
if
[
!
-d
"/opt/py3"
]
;
then
echo
-e
"
\0
33[31m python3虚拟路径不正确
\0
33[0m"
echo
-e
"
\0
33[31m python3虚拟环境不是默认路径
\0
33[0m"
echo
-e
"
\0
33[31m 请手动修改虚拟环境的位置
\0
33[0m"
ps
-ef
|
grep
jumpserver/tmp/beat.pid |
grep
-v
grep
if
[
$?
-ne
0
]
then
echo
-e
"
\0
33[31m jumpserver未运行,请到jumpserver目录使用 ./jms start all -d 启动
\0
33[0m"
exit
0
exit
0
else
echo
-e
"
\0
33[31m 正在计算python3虚拟环境路径
\0
33[0m"
fi
py3pid
=
`
ps
-ef
|
grep
jumpserver/tmp/beat.pid |
grep
-v
grep
|
awk
'{print $2}'
`
py3file
=
`
cat
/proc/
$py3pid
/cmdline
`
py3even
=
`
echo
${
py3file
%/bin/python3*
}
`
echo
-e
"
\0
33[31m python3虚拟环境路径为
$py3even
\0
33[0m"
source
$py3even
/bin/activate
else
else
source
/opt/py3/bin/activate
source
/opt/py3/bin/activate
fi
fi
...
@@ -37,6 +48,8 @@ fi
...
@@ -37,6 +48,8 @@ fi
git pull
&&
pip
install
-r
requirements/requirements.txt
&&
cd
utils
&&
sh make_migrations.sh
git pull
&&
pip
install
-r
requirements/requirements.txt
&&
cd
utils
&&
sh make_migrations.sh
cd
..
&&
./jms start all
-d
echo
-e
"
\0
33[31m 请检查jumpserver是否启动成功
\0
33[0m"
echo
-e
"
\0
33[31m 备份文件存放于
$jumpserver_backup
目录
\0
33[0m"
echo
-e
"
\0
33[31m 备份文件存放于
$jumpserver_backup
目录
\0
33[0m"
exit
0
exit
0
Write
Preview
Markdown
is supported
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