Freeradius - Service restart from Script
I'm working on my freeradius implemantion within pfsense.
I did use an external freeradius appliance until now, but I want pfsense to do server and client for the captive portal.
For this, I configured the crontab like this:
*/5 * * * * /usr/local/etc/rc.d/make_radius.sh >> /tmp/make_radius.log # Generate Radius from Local
And made an radius generator:
echo -n "Make Radius "
date '+%d-%m-%Y %k:%M:%S'
killall -9 radiusd
/usr/local/bin/curl -s –insecure https://MYWEBSITEWITHRADIUSFILE > /usr/local/etc/raddb/users
It does work, but not always.
After reboot, the Service is running, goes down, and stays down.
The script does run but can't reenable it - only myself via the pfsense Service Tab in the Webportal (marked Down there aswell).
After that, it does run a while and everythings working - and out of the sudden, everything is down again...
So some cron runs do go through... and then some really "kill it".
How do I solve this problem?