server: clear folders during initialization instead of deleting them (#572)

This commit is contained in:
Evgeny Poberezkin
2022-11-28 07:40:59 +00:00
committed by GitHub
parent 0942bf9f1e
commit f53c1f5559
4 changed files with 9 additions and 6 deletions
@@ -50,8 +50,8 @@ ntfServerCLI cfgPath logPath =
executableName = "ntf-server"
storeLogFilePath = combine logPath "ntf-server-store.log"
initializeServer InitOptions {enableStoreLog, signAlgorithm, ip, fqdn} = do
deleteDirIfExists cfgPath
deleteDirIfExists logPath
clearDirIfExists cfgPath
clearDirIfExists logPath
createDirectoryIfMissing True cfgPath
createDirectoryIfMissing True logPath
let x509cfg = defaultX509Config {commonName = fromMaybe ip fqdn, signAlgorithm}