1
0

update_huntgroups.sh 331 B

1234567891011121314151617
  1. #!/bin/bash
  2. CFG_FILE=/etc/freeradius/3.0/mods-config/preprocess/huntgroups
  3. /opt/Eye/scripts/utils/radius/print_huntgroups.pl >"${CFG_FILE}.new"
  4. ret=$?
  5. if [ $ret -ne 0 ]; then
  6. echo "Error update huntgroups!"
  7. exit 100
  8. fi
  9. cat "${CFG_FILE}.new" >${CFG_FILE}
  10. rm -f "${CFG_FILE}.new"
  11. systemctl restart freeradius
  12. exit 0