[SUCS Devel] [Git][sucs/accountmanager][master] Also disable apache vhosts when deleting people

Imran Hussain imranh at sucs.org
Sun Mar 10 12:47:05 GMT 2019


Imran Hussain pushed to branch master at sucs / accountmanager


Commits:
5277a6c9 by Imran Hussain at 2019-03-10T12:46:31Z
Also disable apache vhosts when deleting people

- - - - -


1 changed file:

- sucsam.py


Changes:

=====================================
sucsam.py
=====================================
@@ -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])



View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/5277a6c9024df38e2e167e213f1ee7b4cd5e5176

-- 
View it on GitLab: https://projects.sucs.org/sucs/accountmanager/commit/5277a6c9024df38e2e167e213f1ee7b4cd5e5176
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20190310/570b033c/attachment.html>


More information about the Devel mailing list