Set default status (Start or Stop) on service?
-
Hi.
I recently installed pfSense, and I also installed the package FreeRadius - mainly because I might need it later, but also because I needed
bash
(and it was a dependency). So as of this moment, I don't need the FreeRadius service to start automatically.
I also have some other packages, where the service should just stay stopped until I choose to start it.The problem is, FreeRadius starts itself everytime I update or install a package, so it seems it's not possible to set the service to "off" as default - or at least I can't find where to do so.
I would think it should be trivial to set a service to not automatically start - but I have much more experience with Linux than pfSense/FreeBSD, so currently at a loss here.
Thanks!
-
@ameinild said in Set default status (Start or Stop) on service?:
I don't need the FreeRadius service to start automatically.
Humm. Good question.
Most probably : if you didn't enter parameters to work with, it probably starts, end then errors out, and done.Check for yourself. Use the console, and enter "I want to know mode (option 8)".
ps ax | grep 'radiusd'If it shows a line like
3616 - Is 2:00.04 /usr/local/sbin/radiusd
you'll know it running.
You could kill it :kill 3616
and it would stay 'off' as long as you don't restart pfSense.
edit : you could also kill it here :
but on the very first 'pf reload' (happens rather often) packages can get restarted and it runs again ... doing nothing for sure.
end edit ----Btw : if you need only bash, why not :
Remove the pfSense package Freeradius with the GUI.
Install bash manually.While you have the console option 8 open :
pkg install bash
and now you have bash on your pfSense.
For the record : in the past, I wanted bash also, and did exactly what you did : I installed the pfSense freeradius package
-
Most third-party optional packages for pfSense that require an underlying binary piece to be executing in order for the package to function (FreeRadius would be an example as is Snort and Suricata, for example) have a shell script that is installed with the package. That shell script is called at the end of the package installation process by the pfSense package install code. The shell script usually resides in
/usr/local/etc/rc.d/
. The exact shell script name and location is specified in the <package> section ofconfig.xml
in an entry that is specific to each third-party package.I believe the assumption is the user would want the newly installed package to start up, thus the call is made to the shell script (when one is provided by the package). The same shell script is also called when pfSense reboots, so the package's binary component(s) can be started up at boot.
Packages also have the option of hooking into a couple of other pfSense "events" such that the package is notified when that event in pfSense fires. Perhaps FreeRadius is also looking for another triggering event to start. The process I described above is package-specific. The only shell script called is the one for the specific package being installed. Packages also have an option as to how they respond to specific events pfSense notifies them about. But this is controlled by the PHP code in each package. You could probably analyze the FreeRadius PHP code and trace how it responds to the "sync all packages" command. You might find a solution to your problem that way.
-
Yeah ok, thanks. I can totally live with this for now. I might just install Bash manually, or else it doesn't matter too much.
-
Yeah if you only need bash just install bash and avoid this issue entirely.