a.py 422 B

12345678910111213141516171819
  1. import os
  2. destination_config_dir = '/usr/local/RapidBackup/config/destinations'
  3. destinacija = "/etc/passwd /etc/passwd"
  4. # Show file path
  5. def delete_destination():
  6. file_path = os.path.join(destination_config_dir, f"{destinacija}.conf")
  7. print(file_path)
  8. try:
  9. with open(file_path, 'r') as file:
  10. print(file.read())
  11. except FileNotFoundError:
  12. print("nema")
  13. delete_destination()