#!/bin/sh

[ -z "$3" ] && exit 1

if [ -x /usr/share/freeradius/data/nibs_cfg.sh ]; then
    /usr/share/freeradius/data/nibs_cfg.sh $1 $2 $3
    [ -f /etc/freeradius3/mods-available/eap ] && {
	chmod a-w /etc/freeradius3/mods-available/eap
	chmod a-w /etc/freeradius3/certs/dh
	[ -f /etc/freeradius3/certs/certs/dh ] && chmod a-w /etc/freeradius3/certs/certs/dh
    }
elif [ -x /usr/share/plib/data/starad_cfg.sh ]; then
    /usr/share/plib/data/starad_cfg.sh $1 $2 $3
fi
