The open source Chef server includes a command-line utility named chef-server-ctl, which is used to start and stop individual services, reconfigure the Chef server, and tail Chef server log files.
This command has the following syntax:
chef-server-ctl OPTION
This command has the following options:
Use for in-place upgrades of the Open Source Chef server, version 11.0.4 (or higher). This subcommand will apply the necessary SQL changes without having to back up data and install the server from scratch. (Data should still be backed up before performing the upgrade, just to ensure that it is available, should it be needed.) This subcommand may only be used when the Open Source Chef server is configured for a standalone topology and it assumes that all services used by Open Source Chef are enabled.
Warning
The upgrade option applies only to upgrading standalone configurations of the Open Source Chef server.
The following examples show how to use chef-server-ctl to manage services.
View the status of a service
$ ctl-chef-server status name_of_service
For example, to view the status for a service named erchef, enter:
$ ctl-chef-server status erchef
Restart a service
$ ctl-chef-server restart name_of_service
For example, to restart a service named erchef, enter:
$ ctl-chef-server restart erchef
Restart all services
$ ctl-chef-server restart