Commit ae872e5d authored by Valentin Samir's avatar Valentin Samir

[ressuscite_lc] wrapper tout con vers la fonction de resurrection de lc_ldap

parent 37bd7101
#!/usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
import sys
sys.path.append('/usr/scripts/')
import lc_ldap.shortcuts
if __name__ == '__main__':
if len(sys.argv) >=2:
conn=lc_ldap.shortcuts.lc_ldap_admin()
for file in sys.argv[1:]:
try:
conn.ressuscite(file)
except lc_ldap.attributs.UniquenessError as e:
sys.stderr.write("%s\n" % e)
else:
sys.stderr.write("Usage: %s [fichier_du_cimetière]*\nLe cimetière est dans /home/cimetiere_lc/\n" % sys.argv[0])
#! /bin/sh
LANG=fr_FR.UTF-8 sudo -u respbats /usr/scripts/gestion/ressuscite_lc.py $*
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