Commit 9381e8e4 by jajapi

add updatePM.py,cms_serverlist.txt

parent e424c5c2
......@@ -566,6 +566,7 @@ then
VAR=1
fi
if [ $VAR -eq 0 ]
if [ $VAR -eq 0 ];
then
KPF_LOCAL_MAIN
fi
File mode changed
#!/usr/bin/env python
import paramiko
import getpass
### read serverlists
serverlist = open("serverlist.txt", 'r')
serverhost = serverlist.readlines()
### input password
password = getpass.getpass("orchard password :")
### static value
username = "orchard"
port = 22
### update check.sh
for svrhost in serverhost:
host = svrhost.strip()
transport = paramiko.Transport((host,port))
transport.connect(username=username, password=password)
sftp=paramiko.SFTPClient.from_transport(transport)
filepath = '/home/orchard/Integration_uxen_check.sh'
localpath = '/home/developer/Project/CSCS/GuestPM/Integration/Integration_uxen_check.sh'
sftp.put(localpath,filepath)
sftp.close()
transport.close()
import paramiko
import getpass
serverlist = open("cms_serverlist.txt", 'r')
serverhost = serverlist.readlines()
password = getpass.getpass("orchard password :")
username = "orchard"
port = 22
for name in serverhost:
host = name.strip()
transport = paramiko.Transport((host,port))
transport.connect(username=username, password=password)
sftp=paramiko.SFTPClient.from_transport(transport)
filepath = '/home/orchard/Integration_uxen_check.sh'
localpath = '/home/developer/Project/CSCS/GuestPM/Integration/Integration_uxen_check.sh'
sftp.put(localpath,filepath)
sftp.close()
transport.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment