mirror of
https://gitlab.sectorq.eu/jaydee/omv_backup.git
synced 2025-07-02 08:08:32 +02:00
lala
This commit is contained in:
@ -300,19 +300,19 @@ if _BACKUP:
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
directory = '/backups/'
|
directory = '/backups/'
|
||||||
count = len(fnmatch.filter(os.listdir(directory), '*.*'))
|
count = len(fnmatch.filter(os.listdir(directory), '.*'))
|
||||||
|
|
||||||
print('File Count:', count)
|
print('File Count:', count)
|
||||||
|
if count == 0:
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
|
||||||
|
|
||||||
# iterate over files in
|
# iterate over files in
|
||||||
# that directory
|
# that directory
|
||||||
for filename in os.scandir(directory):
|
for filename in os.scandir(directory):
|
||||||
if filename.is_file():
|
if filename.is_file():
|
||||||
|
|
||||||
print(filename.path)
|
print(filename.path)
|
||||||
|
continue
|
||||||
print("Backup")
|
print("Backup")
|
||||||
for b in backups[host]:
|
for b in backups[host]:
|
||||||
topic = "sectorq/omv/backups/{}".format(b.lower())
|
topic = "sectorq/omv/backups/{}".format(b.lower())
|
||||||
|
Reference in New Issue
Block a user