send_calendar.py 522 B

123456789101112131415161718192021
  1. # TODO: Отправляем календарь на сервер
  2. #
  3. import paramiko
  4. import bot.config as cnf
  5. import shutil
  6. file = 'calendar.ics'
  7. folder = '/var/www/vmshay/calendar.ics'
  8. async def send():
  9. shutil.copy(file, folder)
  10. # with paramiko.SSHClient() as ssh:
  11. # ssh.load_system_host_keys()
  12. # ssh.connect(hostname=cnf.SSH_HOST, username=cnf.SSH_USER, password=cnf.SSH_PASS)
  13. #
  14. # sftp = ssh.open_sftp()
  15. #
  16. # sftp.chdir('/var/www/vmshay')
  17. # sftp.put(file, file)