Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
orchard
/
CSCS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b50f33f0
authored
Nov 15, 2018
by
jajapi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed checkPM.py, cms_serverlist.txt, updateSH.py
parent
924baab2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
MgmtPM/CMSmgmt/checkPM.py
MgmtPM/CMSmgmt/cms_serverlist.txt
MgmtPM/CMSmgmt/updateSH.py
MgmtPM/CMSmgmt/checkPM.py
View file @
b50f33f0
...
...
@@ -60,8 +60,9 @@ for svrhost in serverhost:
### 인자값 초기화
os
.
system
(
'sed -i "s/1/0/" factor'
)
filepath
=
(
'/home/orchard/factor'
)
localpath
=
(
'/home/orchard/CSCS/Mgmt/CMSmgmt/factor'
)
localpath
=
(
'/home/orchard/CSCS/Mgmt
PM
/CMSmgmt/factor'
)
sftp
.
put
(
localpath
,
filepath
)
fac
=
subprocess
.
check_output
(
'cat factor'
,
shell
=
True
)
### sftp 접속종료
sftp
.
close
()
...
...
MgmtPM/CMSmgmt/cms_serverlist.txt
View file @
b50f33f0
cms-p-pm01
cms-p-pm02
cms-p-pm03
cms-p-pm04
cms-p-pm05
cms-p-pm06
cms-p-spm01
cms-t-pm01
cms-t-pm02
cms-t-pm03
cms-t-spm01
web-p-pm01
web-p-pm02
...
...
MgmtPM/CMSmgmt/updateSH.py
View file @
b50f33f0
...
...
@@ -35,8 +35,17 @@ for svrhost in serverhost:
localpath
=
'/home/orchard/CSCS/GuestPM/Integration/factor'
sftp
.
put
(
localpath
,
filepath
)
print
(
"
%
s Successful updates"
%
host
)
sftp
.
close
()
transport
.
close
()
ssh
=
paramiko
.
SSHClient
()
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
connect
(
host
,
username
=
username
,
password
=
'
%
s'
%
(
password
))
ssh
.
exec_command
(
'sudo chmod 700 /home/orchard/Seocho_uxen_check.sh'
)
ssh
.
close
()
print
(
"
%
s Successful updates"
%
host
)
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