-
Notifications
You must be signed in to change notification settings - Fork 0
/
FRMan
52 lines (50 loc) · 1.78 KB
/
FRMan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
user=$(whoami)
#Checking for user permissions
if [ "$user" != "root" ]; then
echo ${red}"This program must be run as root ${textreset}"
echo "Exiting"
exit
else
echo "Running Program"
fi
items=(1 "Add MAC Address for Auth"
2 "Delete MAC Address from Auth"
3 "Add MAC Address for Auth with iPSK"
4 "Delete MAC Address with iPSK from Auth"
5 "Query Users File"
6 "Edit Users File"
7 "Start FreeRADIUS Service"
8 "Stop FreeRADIUS Service"
9 "Restart FreeRADIUS Service"
10 "FreeRADIUS Service Status"
11 "Debug Mode -radiusd -X-"
12 "AD Connector Diag"
13 "Test PEAP/MSCHAP"
14 "Generate self-signed Certs"
15 "Renew existing Certs"
)
while choice=$(dialog --title "$TITLE" \
--backtitle "FreeRADIUS Service Management" \
--menu "Please select" 25 50 3 "${items[@]}" \
2>&1 >/dev/tty); do
case $choice in
1) /root/.servman/FRManager/create-mac-auth-entry ;;
2) /root/.servman/FRManager/delete-mac-auth-entry ;;
3) /root/.servman/FRManager/create-mac-auth-entry-ipsk ;;
4) /root/.servman/FRManager/delete-mac-auth-entry-ipsk ;;
5) /root/.servman/FRManager/query-mac ;;
6) /root/.servman/FRManager/edit-users ;;
7) /root/.servman/FRManager/start-freeradius-server ;;
8) /root/.servman/FRManager/stop-freeradius-server ;;
9) /root/.servman/FRManager/restart-freeradius-server ;;
10) /root/.servman/FRManager/service-freeradius-status ;;
11) /root/.servman/FRManager/debug-freeradius ;;
12) /root/.servman/FRManager/debug-ad-connector ;;
13) /root/.servman/FRManager/fr-peap-mschap-test ;;
14) /root/.servman/FRManager/generate-cert ;;
15) /root/.servman/FRManager/renew-cert ;;
*) ;; # some action on other
esac
done
clear # clear after user pressed Cancel