diff --git a/gestion/ressuscite_lc.py b/gestion/ressuscite_lc.py new file mode 100755 index 00000000..10b1ecdd --- /dev/null +++ b/gestion/ressuscite_lc.py @@ -0,0 +1,18 @@ +#!/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]) diff --git a/respbats/ressuscite_lc b/respbats/ressuscite_lc new file mode 100755 index 00000000..a4727123 --- /dev/null +++ b/respbats/ressuscite_lc @@ -0,0 +1,3 @@ +#! /bin/sh + +LANG=fr_FR.UTF-8 sudo -u respbats /usr/scripts/gestion/ressuscite_lc.py $*