fix freeradius test

This commit is contained in:
nazunalika 2021-07-05 15:35:12 -07:00
parent 879b03ac52
commit 08c1035c5f
Signed by untrusted user who does not match committer: label
GPG Key ID: 6735C0E1BD65D048

View File

@ -9,9 +9,11 @@ rocky Cleartext-Password := "rocky"
EOF EOF
r_log "freeradius" "Testing..." r_log "freeradius" "Testing..."
systemctl start radiusd.service
sleep 1
echo "User-Name=rocky,User-Password=rocky " | radclient -x localhost:1812 auth testing123 | grep -q 'Access-Accept' echo "User-Name=rocky,User-Password=rocky " | radclient -x localhost:1812 auth testing123 | grep -q 'Access-Accept'
r_checkExitStatus $? r_checkExitStatus $?
cp /etc/raddb/users.backup /etc/raddb/users cp /etc/raddb/users.backup /etc/raddb/users
rm -rf /etc/raddb/users.backup rm -rf /etc/raddb/users.backup
service radiusd stop systemctl stop radiusd.service