freebsd-fscd
freebsd-fscd copied to clipboard
Is there a complete manual on how to use fscd on FreeBSD 13.1?
Hi, no, sorry, just the manual pages. Does it crash or have issues? I could try to free up time to investigate or are you thinking of just add something to the Readme? Cheers,
--Tom
Install using pkg install fscd
. Enable fscd service e.g. service fscd enable
, Add one service per line to /usr/local/etc/fscd.conf
e.g. echo sshd >>/usr/local/etc/fscd.conf
, finally start fscd service fscd start
.
Install using
pkg install fscd
.
In what repo is fscd available to public? pkg search fscd
returns nothing. I didn't find it in FreeBSD ports tree.
Hi, you have to use "pkg install fsc" to get the port. It lives in the sysutils/fsc ports directory. At a glance, it worked on my 13.1 system, but I did not go through a full testing run. If there is some documentation I need to update, just let me know, please, and thanks!
Thank you! That explains why I didn't find it.
Does fsc(d) support services with "profiles"? Apache, nginx, OpenVPN, MariaDB, Postgres and many other ports support running multiple named instances controlled by service
like this:
service apache24 start cust1
service apache24 start cust2
service apache24 start cust3
Each has it's own conf, pidfile etc. Is it possible to have each (or only some of them) defined in fscd.conf
and whatched by fscd
?
It's been a few years, but I don't believe it supports profiles because we use the service name and try to start it through the rc.d system startup file. I wonder how this might look. I guess I have to look at how the profiles work as I imagine them to be separate instances and defined separately in rc.conf and possibly using a different configuration file per instance? If so, then, say, adding a service as apache24_cust1 might work, if it's started and stopped using
service apache24_cust1 start|stop
If it's done differently, maybe fscadm needs something similar to "-p" add a profile for this service to manage. If it all works the same, then "-p" can just pass the profile name to the init script, which would work across the board for everything. I'll see if I can find free time to investigate the profile stuff. Thoughts?
Apache profiles (and profiles for postgres, nginx, mysql, mariadb...) must be listed in rc.conf
in variable apache24_profiles="cust1 cust2"
Then you have some other vars like apache24_flags
available as apache24_cust1_flags
and apache24_cust2_flags
.
The rc script is still the only one rc.d/apache24
and the name of the profile must be appended after command start|stop|restart
service apache24 start cust1
service apache24 start cust2
Calling service apache24 start
without any profile name will start all profiles defined in rc.conf
. I guess this can confuse fscd
?
The way you posted service apache24_cust1 start|stop
requires symlinked rc script and as far as I know only OpenVPN uses this style of profiles where one need to create symlinks in rc.d
for each instance.
If we need to teach fscadm
about profiles then we need to allow some separator in fscd.conf
between service name (name of the script in rc.d
) and the profile name (name of the instance to watch).
Maybe something like this:
apache24:cust1
apache24:cust2
mysql-server:prod
mysql-server:test
Okay, thank you for the clarification as I had an idea of how the profiles would work but had yet to test/verify. I think we can teach fscd
about the :
character easily enough, and add an extra flag command line for monitoring profile-based services. Maybe it's something I can work on this weekend depending on my workload.