package.py 397 B

123456789101112131415161718192021
  1. #!/usr/bin/env python2
  2. # -*- coding: utf-8 -*-
  3. import os
  4. DIR = "/var/lib/tox-bootstrapd"
  5. def postInstall(fromVersion, fromRelease, toVersion, toRelease):
  6. try:
  7. os.system("useradd -r -m -d %s -s /sbin/nologin -U tox-bootstrapd" % DIR)
  8. except:
  9. pass
  10. os.chmod(DIR, 0700)
  11. def postRemove():
  12. try:
  13. os.system("userdel -r tox-bootstrapd")
  14. os.system("groupdel tox-bootstrapd")
  15. except:
  16. pass