bye bye secrets.py

On vire les dernières références à secrets.py via import direct de
/etc/crans/secrets/secrets.py

Ci-dessous une liste des trucs modifié et les raisons
./gestion/iscsi/nolslib.py:execfile("/etc/crans/secrets/nols.py")
./gestion/iscsi/slonlib.py:execfile("/etc/crans/secrets/slon.py")
./gestion/gen_confs/trigger.py:_args = ["ssh", "-4", "-i", "/etc/crans/secrets/trigger-generate" ]

./gestion/gen_confs/dhcpd_new.py:        sys.path.append('/usr/scripts/gestion/secrets')
./gestion/gen_confs/dhcpd_new.py:        from secrets import dhcp_omapi_keyname,dhcp_omapi_keys
./gestion/gen_confs/populate_sshFingerprint.py:sys.path.append('/etc/crans/secrets/')
./sip/sms_queuing:sys.path.insert(0, '/usr/scripts/gestion/secrets')
./sip/sms_queuing:from secrets import asterisk_sms_passwd
./sip/sip_multidial.py:sys.path.append('/etc/crans/secrets/')
./sip/sip_multidial.py:import secrets

./gestion/gen_confs/switchs.py:        sys.path.append('/usr/scripts/gestion/secrets')
./gestion/gen_confs/switchs.py:        from secrets import radius_key
./gestion/set_droits.sh:  if [[ $1 = "$BASE/secrets" ]] ; then
./gestion/set_droits.sh:  elif [[ $1 = "$BASE/secrets/secrets.py" ]] || [[ $1 = "$BASE/secrets/secrets.pyc" ]]; then
./admin/confmail/conf_mail.py:sys.path.append('/usr/scripts/gestion/secrets')
./admin/confmail/conf_mail.py:from secrets import secretConfirmMail
This commit is contained in:
Daniel STAN 2014-07-22 20:29:59 +02:00
parent 77e0b1daad
commit 92275f8948
11 changed files with 24 additions and 896 deletions

View file

@ -2,11 +2,10 @@
# -*- coding: utf-8 -*-
import sys,os,hashlib
# The fuck is happening here ?
sys.path.append('/usr/scripts/gestion')
sys.path.append('/usr/scripts/')
sys.path.append('/etc/crans/secrets/')
import secrets
import lc_ldap.shortcuts
from asterisk_reload_conf import reload_config

View file

@ -1,10 +1,10 @@
#!/usr/bin/env python
#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
from asterisk import Sms
import sys
sys.path.insert(0, '/usr/scripts/gestion/secrets')
from secrets import asterisk_sms_passwd
from gestion import secrets_new as secrets
if __name__ == '__main__' :
sms=Sms("dbname='django' user='crans' host='pgsql.adm.crans.org'", "voip_sms")
sms.sms_daemon('localhost', 5038, 'sms', asterisk_sms_passwd)
sms.sms_daemon('localhost', 5038, 'sms', secrets.get('asterisk_sms_passwd'))

View file

@ -8,8 +8,8 @@
# Short-Description: Asterisk sms delivery
### END INIT INFO
DAEMON="/usr/bin/python"
ARGS="/usr/scripts/sip/sms_queuing"
DAEMON="/usr/scripts/sip/sms_queuing"
ARGS=""
PIDFILE="/var/run/sms_queuing.pid"
USER="asterisk"