Browse Source

make root dir; reload cron only of needed; remove old apache conf

tags/v2.0.0^0
Robin Thoni 7 years ago
parent
commit
6d8a8083bf
2 changed files with 6 additions and 3 deletions
  1. 5
    3
      install
  2. 1
    0
      sitegen.py

+ 5
- 3
install View File

24
 
24
 
25
 cp "${dir}/bash/sitegen.completion" /etc/bash_completion.d/sitegen &&
25
 cp "${dir}/bash/sitegen.completion" /etc/bash_completion.d/sitegen &&
26
 
26
 
27
+a2disconf letsencrypt &&
28
+rm /etc/apache2/conf-available/sitegen.conf &&
27
 cp "${dir}/apache/sitegen.conf" /etc/apache2/conf-available/sitegen.conf &&
29
 cp "${dir}/apache/sitegen.conf" /etc/apache2/conf-available/sitegen.conf &&
28
 a2enconf sitegen &&
30
 a2enconf sitegen &&
29
 service apache2 reload &&
31
 service apache2 reload &&
31
 if [ ! -e /etc/cron.d/sitegen-cert-renew ]
33
 if [ ! -e /etc/cron.d/sitegen-cert-renew ]
32
 then
34
 then
33
   rm -f  /etc/cron.d/cert-renew &&
35
   rm -f  /etc/cron.d/cert-renew &&
34
-  cp "${dir}/cron/sitegen-cert-renew" /etc/cron.d/sitegen-cert-renew
35
-fi &&
36
-service cron reload
36
+  cp "${dir}/cron/sitegen-cert-renew" /etc/cron.d/sitegen-cert-renew &&
37
+  service cron reload
38
+fi

+ 1
- 0
sitegen.py View File

256
 
256
 
257
         self.execute_hooks("site", "pre", args)
257
         self.execute_hooks("site", "pre", args)
258
 
258
 
259
+        self.make_dirs_p(self.get_site_dir(domain))
259
         i = 0
260
         i = 0
260
         while i < len(conf_files):
261
         while i < len(conf_files):
261
             self.generate_site_conf_file(domain, conf_files[i], site_files[i])
262
             self.generate_site_conf_file(domain, conf_files[i], site_files[i])

Loading…
Cancel
Save