Create func copy_to_host

This commit is contained in:
Stepan Zhukovsky 2023-02-15 15:39:31 +09:00
parent 351403f563
commit c643ac15a3
2 changed files with 12 additions and 0 deletions

12
main.py
View File

@ -2,13 +2,20 @@
# -*- coding: utf-8 -*-
__author__ = 'MOIS3Y'
import subprocess
import requests
from time import sleep
from models_vm import VmAccount
from models_dci import AuthUser
from settings import CLIENT_HOST, PLATFORM
def copy_to_host(src, dst):
cmd='cp "%s" "%s"' % (src, dst)
return subprocess.call(cmd, shell=True)
class Access(object):
"""
Allows you to get a link with an authorization key
@ -112,9 +119,14 @@ def main():
print("Your access link: \n")
print(access_link, "\n")
print("Copy get-logs.sh to /root/get-logs.sh \n")
print(copy_to_host(src="./scripts/get-logs.sh", dst="./host"))
print("ENJOY MY FRIEND! \n")
print("="*47)
if __name__ == "__main__":
main()