Commit 336b2eaf authored by Daniel STAN's avatar Daniel STAN

send_sms: gepass.getuser() pour l'user courant

parent 98aeef18
......@@ -17,6 +17,7 @@ sys.path.append('/usr/scripts/gestion/secrets')
from secrets import asterisk_sms_passwd
import os
import getpass
import sys
import argparse
......@@ -35,7 +36,7 @@ from sip.asterisk import Manager
if __name__ == '__main__':
args = parser.parse_args(sys.argv[1:])
login = os.getenv("SUDO_USER") or os.getenv("USER")
login = getpass.getuser()
ldap = lc_ldap.shortcuts.lc_ldap_readonly()
adh ='uid=%s' % login)[0]
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