parent
688ac1d129
commit
9c6da2330d
3 changed files with 7 additions and 7 deletions
|
@ -25,12 +25,12 @@ Recuperation des secrets depuis /etc/crans/secrets.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from syslog import syslog, openlog, closelog
|
from syslog import syslog, openlog
|
||||||
import getpass
|
import getpass
|
||||||
|
|
||||||
def get(secret):
|
def get(secret):
|
||||||
""" Recupere un secret. """
|
""" Recupere un secret. """
|
||||||
#openlog('secrets_new')
|
openlog('secrets_new')
|
||||||
prog = os.path.basename(getattr(sys, 'argv', ['undefined'])[0])
|
prog = os.path.basename(getattr(sys, 'argv', ['undefined'])[0])
|
||||||
syslog('%s (in %s) asked for %s' % (getpass.getuser(), prog, secret))
|
syslog('%s (in %s) asked for %s' % (getpass.getuser(), prog, secret))
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -53,9 +53,9 @@ TEMP_FILE=$(mktempfile munin-radius-wifi.XXXXXX)
|
||||||
if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
|
if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
|
||||||
then
|
then
|
||||||
if [ $ARGS != 0 ]; then
|
if [ $ARGS != 0 ]; then
|
||||||
$LOGTAIL -f ${FREERADIUS_LOG} -o ${STATEFILE} | grep 'freeradius\(\[.*\]\)\?:' > ${TEMP_FILE}
|
$LOGTAIL -f ${FREERADIUS_LOG} -o ${STATEFILE} | grep 'freeradius\[.*\]:' > ${TEMP_FILE}
|
||||||
else
|
else
|
||||||
$LOGTAIL ${FREERADIUS_LOG} ${STATEFILE} | grep 'freeradius\(\[.*\]\)\?:' > ${TEMP_FILE}
|
$LOGTAIL ${FREERADIUS_LOG} ${STATEFILE} | grep 'freeradius\[.*\]:' > ${TEMP_FILE}
|
||||||
fi
|
fi
|
||||||
success=$(grep -c 'Login OK' ${TEMP_FILE})
|
success=$(grep -c 'Login OK' ${TEMP_FILE})
|
||||||
failures=$(grep -c 'Login incorrect' ${TEMP_FILE})
|
failures=$(grep -c 'Login incorrect' ${TEMP_FILE})
|
||||||
|
|
|
@ -21,8 +21,8 @@ def macro_LostSoulsInGroups(macro, args):
|
||||||
request = macro.request
|
request = macro.request
|
||||||
_ = macro.request.getText
|
_ = macro.request.getText
|
||||||
|
|
||||||
sRet = u"<p><b>Éléments dans des groupes custom qui ne correspondent pas à un compte wiki :</b></p>"
|
sRet = "<p><b>Items in custom groups (Users in custom groups who don't have user accounts)</b></p>"
|
||||||
sRet = sRet + u"<table>"
|
sRet = sRet + "<table>"
|
||||||
userlist = []
|
userlist = []
|
||||||
lostsouls = {}
|
lostsouls = {}
|
||||||
for uid in user.getUserList(request):
|
for uid in user.getUserList(request):
|
||||||
|
@ -51,7 +51,7 @@ def macro_LostSoulsInGroups(macro, args):
|
||||||
lostsouls[pg] = [st]
|
lostsouls[pg] = [st]
|
||||||
|
|
||||||
for k, v in lostsouls.iteritems():
|
for k, v in lostsouls.iteritems():
|
||||||
st = u'<tr><td>%s</td><td>%s</td></tr>' % (Page(request, k).link_to(request), ", ".join(v))
|
st = '<tr><td>%s</td><td>%s</td></tr>' % (Page(request, k).link_to(request), ", ".join(v))
|
||||||
sRet = sRet + st
|
sRet = sRet + st
|
||||||
|
|
||||||
sRet = sRet + "</table>"
|
sRet = sRet + "</table>"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue