fscadm —
Alter service monitoring
status
fscadm |
[-w] disable
service |
fscadm |
[-w] enable
service pidfile |
The FreeBSD services control
administration utility, fscadm enables or disables
monitoring for a specified service. It may also be used to print a list of
services currently being monitored or cleanly shutdown the services control
daemon,
fscd(8).
When invoked, the fscadm utility will
connect with the
fscd(8) daemon and carry out the requested actions. Changes
in service states will not be propagated to the
rc.conf(5) file, these alterations must be handled manually.
In addition, fscadm only supports services which may
be monitored through a pidfile and have a
corresponding
rc(8) control script.
When the -w option is specified
fscadm will attempt to write the enable or disable
changes to disk. The following options are available:
close
- Close the
fscd(8) daemon but leave its service configuration file,
/var/db/fsc/services.db, in place. This is
preferred when services will persist over system reboots.
disable
- Disable monitoring for the requested service. The service will not be
stopped prior to removal. If the requested service is unknown, this
command will be ignored.
enable
- Enable service monitoring for the requested service. The first argument
must be the
rc(8) control script name and the second is an absolute
path to the pidfile. A service must have an enable
entry in
rc.conf(5) or it will not be added. If the service is
currently not running, it will be started using the provided information.
If the service cannot start,
fscadm will exit
without attempting to contact the
fscd(8) daemon.
shutdown
- Request a clean shutdown of
fscd(8) including removal of the known services database
and socket file.
status
- Print the
fscd(8) process id and a list of all services being
monitored. Services that cannot be started through
fscd(8) will be removed from the list during failure.
In both the enable and disable cases, fscd
will update the database file with the new information.
Exit status is 0 on success or 1 if the command has failed to
start a service.
The fscadm utility is available as part of
the ports collection or online via github.
The fsc utilities and documentation were
written by Tom Rhodes
⟨trhodes@FreeBSD.org⟩.