mirror of
				https://github.com/kevinveenbirkenbach/docker-volume-backup.git
				synced 2025-11-03 18:17:56 +00:00 
			
		
		
		
	changed loading of directory-validator
This commit is contained in:
		@@ -64,6 +64,7 @@ BACKUPS_DIR = '/Backups/'
 | 
				
			|||||||
VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME)
 | 
					VERSIONS_DIR = os.path.join(BACKUPS_DIR, MACHINE_ID, REPOSITORY_NAME)
 | 
				
			||||||
BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S")
 | 
					BACKUP_TIME = datetime.now().strftime("%Y%m%d%H%M%S")
 | 
				
			||||||
VERSION_DIR = create_version_directory()
 | 
					VERSION_DIR = create_version_directory()
 | 
				
			||||||
 | 
					SCRIPTS_DIRECTORY = pathlib.Path(os.path.realpath(__file__)).parent.parent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_instance(container):
 | 
					def get_instance(container):
 | 
				
			||||||
    # The function is defined to take one parameter, 'container', 
 | 
					    # The function is defined to take one parameter, 'container', 
 | 
				
			||||||
@@ -91,7 +92,7 @@ def get_instance(container):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def stamp_directory():
 | 
					def stamp_directory():
 | 
				
			||||||
    """Stamp a directory using directory-validator."""
 | 
					    """Stamp a directory using directory-validator."""
 | 
				
			||||||
    stamp_command = f"python ../directory-validator/directory-validator.py --stamp {VERSION_DIR}"
 | 
					    stamp_command = f"python {SCRIPTS_DIRECTORY}/directory-validator/directory-validator.py --stamp {VERSION_DIR}"
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        execute_shell_command(stamp_command)
 | 
					        execute_shell_command(stamp_command)
 | 
				
			||||||
        print(f"Successfully stamped directory: {VERSION_DIR}")
 | 
					        print(f"Successfully stamped directory: {VERSION_DIR}")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user