Commit 5277a6c9 authored by Imran Hussain's avatar Imran Hussain
Browse files

Also disable apache vhosts when deleting people

parent c13c14cc
......@@ -264,6 +264,11 @@ def deleteUser(peopleList):
# move their mail to the deleted folder
subprocess.call(['sudo', 'mv', "-f", mboxdir+username, persondir+"/mbox"])
# if they have a apcahe vhost kill it
if os.path.exists("/etc/apache2/sites-enabled/" + username + ".conf")
subprocess.call(['sudo', 'a2dissite', username + ".conf"])
subprocess.call(['sudo', 'systemctl', "reload", "apache2.service"])
# remove them from the printer
# pkusers --delete imranh
subprocess.call(['sudo', 'pkusers', "--delete", username])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment