fix: allow dash in hostname

This commit is contained in:
2023-01-16 14:33:47 +01:00
parent bbc1026680
commit 51170127a0

View File

@@ -29,7 +29,7 @@ def createBackupScriptStructure(backupList, baseDomain="", icingaOnly=False):
paths = backup["paths"]
icingaToken = backup["token"]
if not hostname.replace(".","").isalnum():
if not hostname.replace(".","").replace("-","").isalnum():
print("Warning: Backup hostname is not alphanum: '{}'".format(hostname))
continue