diff --git a/pica-db-backup-rotation/start_rotation.py b/pica-db-backup-rotation/start_rotation.py index 754644af77ec37a7f11055f60dc10325a97c5b54..6c198521815d73fb4b9c09527167313fd92acf3e 100755 --- a/pica-db-backup-rotation/start_rotation.py +++ b/pica-db-backup-rotation/start_rotation.py @@ -31,7 +31,7 @@ try: #For each service in the config file, creates a new cron job for service in services_list: - if os.path.isdir(services_list[service]["Folder"]): + if os.path.isdir(os.path.join(BACKUP_FOLDER, services_list[service]["Folder"])): backup_rota = services_list[service]["Backup-Rota"] rotation_cmd = "/usr/local/bin/rotate-backups -H " +str(backup_rota["Hour"]) + " -d " + \ str(backup_rota["Day"]) + " -w " + str(backup_rota["Week"]) + " -m " + str(backup_rota["Month"]) + " " + \