diff --git a/vhost-apache2/vhost.py b/vhost-apache2/vhost.py index d4710e7..a7df07a 100755 --- a/vhost-apache2/vhost.py +++ b/vhost-apache2/vhost.py @@ -93,8 +93,8 @@ def vhost_add(domain): # check is ssl cert exists cert = os.path.join('/etc/letsencrypt/live', domain) if not os.path.exists(cert): - print("warning: SSL certificates do not exist for domain - " + domain) - print("warning: Please make sure to place them in " + cert + " to allow secure https connection to your site.") + print(" warning: SSL certificates do not exist for domain - " + domain) + print(" warning: Please make sure to place them in " + cert + " to allow secure https connection to your site.") # mv conf file to apache if y_n_question("Move " + vhost_file + " to /etc/apache2/sites-available/ ?"): @@ -143,6 +143,9 @@ if __name__ == "__main__": elif args.remove: vhost_remove(d) + if y_n_question("Restart apache2?"): + subprocess.call(['sudo', 'service', 'apache2', 'restart']) + print('done.')