/usr/scripts sans / final
This commit is contained in:
parent
650f55e7e8
commit
ebeab8a0a0
8 changed files with 23 additions and 28 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Envoie un mail avec la liste des serveurs qui ne sont pas synchro avec bcfg2.
|
||||
|
@ -43,7 +43,6 @@ if __name__ == "__main__":
|
|||
debug = "--debug" in sys.argv
|
||||
if "--mail" in sys.argv:
|
||||
if hosts != "":
|
||||
sys.path.append("/usr/scripts/")
|
||||
import utils.sendmail
|
||||
utils.sendmail.sendmail("root@crans.org", "roots@crans.org", u"Serveurs non synchronisés avec bcfg2", hosts, more_headers={"X-Mailer" : "bcfg2-reports"}, debug=debug)
|
||||
elif debug:
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import sys
|
||||
import netaddr
|
||||
|
||||
if '/usr/scripts/' not in sys.path:
|
||||
sys.path.append('/usr/scripts/')
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
|
||||
import syslog
|
||||
import subprocess
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/env python
|
||||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# #############################################################
|
||||
# ..
|
||||
|
@ -38,7 +38,8 @@ import commands
|
|||
import shutil
|
||||
import syslog
|
||||
import stat
|
||||
sys.path.append('/usr/scripts/')
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
from cranslib.deprecated import module as deprecated_module
|
||||
deprecated_module()
|
||||
from cranslib.utils import QuoteForPOSIX as escapeForShell
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# #############################################################
|
||||
# ..
|
||||
|
@ -31,10 +30,11 @@ Calcule le coût des options d'impression.
|
|||
__version__ = '9.11'
|
||||
|
||||
import sys, os.path
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from config import impression as config_impression
|
||||
from gestion.config import impression as config_impression
|
||||
from commands import getstatusoutput
|
||||
sys.path.append('/usr/scripts/')
|
||||
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
from cranslib.utils import logs
|
||||
from subprocess import Popen, PIPE
|
||||
from base import FichierInvalide, SoldeInsuffisant, PrintError, SettingsError
|
||||
|
@ -415,9 +415,7 @@ class impression:
|
|||
|
||||
def _get_adh(self, adh):
|
||||
if type(adh) == str:
|
||||
sys.path.append("/usr/scripts/gestion/")
|
||||
#from ldap_crans_test import crans_ldap
|
||||
from ldap_crans import CransLdap
|
||||
from gestion.ldap_crans import CransLdap
|
||||
adh = CransLdap().getProprio(adh, 'w')
|
||||
return adh
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -
|
||||
# liste d'event http://www.voip-info.org/wiki/view/asterisk+manager+events
|
||||
# liste d'action http://www.voip-info.org/wiki/view/Asterisk+manager+API
|
||||
|
@ -16,7 +15,8 @@ import threading
|
|||
import psycopg2.extras
|
||||
from datetime import datetime
|
||||
|
||||
sys.path.append('/usr/scripts/')
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
import lc_ldap.shortcuts
|
||||
import lc_ldap.objets
|
||||
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys,os,hashlib
|
||||
# The fuck is happening here ?
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
sys.path.append('/usr/scripts/')
|
||||
|
||||
import lc_ldap.shortcuts
|
||||
from asterisk_reload_conf import reload_config
|
||||
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
|
||||
def gen_multidial(name, entensions):
|
||||
dial="""
|
||||
|
@ -24,6 +20,7 @@ exten => %(name)s,n,Hangup()
|
|||
return dial
|
||||
|
||||
if __name__ == '__main__' :
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
multidial=""
|
||||
for droit in ['nounou', 'bureau', 'cableur', 'imprimeur']:
|
||||
multidial+=gen_multidial(droit, (adh['aid'][0].value for adh in conn.search(u'(&(droits=%s)(!(chbre=EXT)))' % droit)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf8 -*-
|
||||
#
|
||||
# Sclaimer
|
||||
|
@ -12,10 +12,11 @@ import sys
|
|||
import smtplib
|
||||
import time
|
||||
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from config import mac_prise
|
||||
from affich_tools import tableau
|
||||
sys.path.append('/usr/scripts/')
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
|
||||
from gestion.config import mac_prise
|
||||
from gestion.affich_tools import tableau
|
||||
import lc_ldap.shortcuts
|
||||
import lc_ldap.objets
|
||||
import collections
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
sys.path.append('/usr/scripts/')
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
import tv.dns
|
||||
sys.path.pop()
|
||||
Dependencies = ["Time"]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue