Commit e0d5ca1a by Bach Dániel

Merge branch 'feature-vm-renewal-copy' into 'master'

Feature Vm Renewal Copy
parents 5bfe7a2d 6a0ff254
......@@ -2,11 +2,19 @@
# -*- coding: utf-8 -*-
from os import mkdir, environ, chdir
import platform
from shutil import copy
import subprocess
import sys
chdir(sys.path[0])
subprocess.call(('pip', 'install', '-r', 'requirements.txt'))
try:
chdir(sys.path[0])
subprocess.call(('pip', 'install', '-r', 'requirements.txt'))
system = platform.system()
if system == 'Linux':
copy("/root/agent/misc/vm_renewal", "/usr/local/bin/")
except:
pass # hope it works
from twisted.internet import reactor, defer
......@@ -16,7 +24,6 @@ from twisted.internet.serialport import SerialPort
import uptime
import logging
import fileinput
import platform
import tarfile
from os.path import expanduser, join, exists
from glob import glob
......@@ -48,7 +55,6 @@ mount_template_linux = (
',password=%(password)s,iocharset=utf8,uid=cloud 0 0\n')
system = platform.system()
distros = {'Scientific Linux': 'rhel',
'CentOS': 'rhel',
'CentOS Linux': 'rhel',
......
#!/bin/bash
sudo bash -c "source /root/.virtualenvs/agent/bin/activate; source /root/.virtualenvs/agent/bin/postactivate 2>/dev/null; cd /root/agent; ./vm_renewal"
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