Browse Source

gen-domains.lua: remove old domains before creating new ones

Karsten Böddeker 6 years ago
parent
commit
db4f0e04c5
1 changed files with 1 additions and 0 deletions
  1. 1 0
      gen-domains.lua

+ 1 - 0
gen-domains.lua

@@ -12,6 +12,7 @@ dofile(site_dir .. '/extra/domains.conf')
 dofile(site_dir .. '/extra/groups.conf')
 local template = io.open(site_dir .. '/domain.tmpl'):read('*a')
 os.execute('mkdir -p ' .. site_dir .. '/domains')
+os.execute('rm -f ' .. site_dir .. '/domains/*')
 
 for _, domain in pairs(domains) do
 	local file = site_dir .. '/domains/' .. domain.domain_code .. '.conf'