Commit 13e51a58 by Őry Máté

copy vm_renewal executable to PATH

parent 5bfe7a2d
...@@ -23,7 +23,7 @@ from glob import glob ...@@ -23,7 +23,7 @@ from glob import glob
from inspect import getargspec, isfunction from inspect import getargspec, isfunction
from StringIO import StringIO from StringIO import StringIO
from base64 import decodestring from base64 import decodestring
from shutil import rmtree, move from shutil import rmtree, move, copy
from datetime import datetime from datetime import datetime
from utils import SerialLineReceiverBase from utils import SerialLineReceiverBase
...@@ -273,6 +273,8 @@ class Context(object): ...@@ -273,6 +273,8 @@ class Context(object):
rmtree(old_dir, ignore_errors=True) rmtree(old_dir, ignore_errors=True)
move(cur_dir, old_dir) move(cur_dir, old_dir)
move(new_dir, cur_dir) move(new_dir, cur_dir)
if system == 'Linux':
copy("/root/agent/misc/vm_renewal", "/usr/local/bin/")
logger.info('Updated') logger.info('Updated')
reactor.stop() reactor.stop()
......
#!/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