1
|
#!/bin/sh
|
2
|
|
3
|
# This script aims to be called by bsnmpd via "extCommand" lines
|
4
|
|
5
|
mdurl() {
|
6
|
echo "Deprecated"
|
7
|
}
|
8
|
|
9
|
wlurl() {
|
10
|
echo "Deprecated"
|
11
|
}
|
12
|
|
13
|
defaultidp() {
|
14
|
echo "Deprecated"
|
15
|
}
|
16
|
|
17
|
__sql() {
|
18
|
sqlite3 /var/db/univnautes-sp.sqlite3 "$@"
|
19
|
}
|
20
|
|
21
|
idp_federation() {
|
22
|
__sql "select count(entity_id) from saml_libertyprovider where federation_source!='__local'"
|
23
|
}
|
24
|
|
25
|
idp_local() {
|
26
|
__sql "select count(entity_id) from saml_libertyprovider where federation_source='__local'"
|
27
|
}
|
28
|
|
29
|
ip_whitelist() {
|
30
|
cd /usr/local/univnautes/sp
|
31
|
ctx=$(./manage.py configxml get cpnames | cut -f1 -d" ")
|
32
|
ipfw -x $ctx table 42 list | wc -l | tr -dc 0-9
|
33
|
echo ""
|
34
|
}
|
35
|
|
36
|
cp_sessions() {
|
37
|
/usr/local/univnautes/sp/cp_get_sessions | wc -l | tr -dc 0-9
|
38
|
echo ""
|
39
|
}
|
40
|
|
41
|
$*
|