Command-Line Tool: servbayctl
servbayctl
is a command-line tool that provides developers with a way to manage ServBay services from the command line. With servbayctl
, you can start, stop, reload, restart, kill, check status, and stop all services. Below is a detailed guide to using servbayctl
.
Supported Commands and Parameters
servbayctl
supports the following commands and parameters:
Usage: servbayctl {start|stop|reload|restart|kill|status|stop-all} {php|mariadb|pgsql|redis|memcached|caddy|dnsmasq} [-all|version]
Basic Commands
Here are the basic commands and examples for servbayctl
:
Start Service
Start the specified service.
servbayctl start {service_name} [-all|version]
Example: Start PHP 7.4 service
servbayctl start php 7.4
Stop Service
Stop the specified service.
servbayctl stop {service_name} [-all|version]
Example: Stop PHP 7.4 service
servbayctl stop php 7.4
Reload Service
Reload the configuration of the specified service.
servbayctl reload {service_name} [-all|version]
Example: Reload PHP 7.4 configuration
servbayctl reload php 7.4
Restart Service
Restart the specified service.
servbayctl restart {service_name} [-all|version]
Example: Restart PHP 7.4 service
servbayctl restart php 7.4
Kill Service
Force kill the specified service process.
servbayctl kill {service_name} [-all|version]
Example: Kill PHP 7.4 service process
servbayctl kill php 7.4
Check Service Status
Check the running status of the specified service.
servbayctl status {service_name} [-all|version]
Example: Check PHP 7.4 service status
servbayctl status php 7.4
Stop All Services
Stop all running services.
servbayctl stop-all
Supported Services
servbayctl
supports the following services:
- php
- mariadb
- pgsql
- redis
- memcached
- caddy
- dnsmasq
Example Operations
Here are some common operation examples:
Start All PHP Versions
servbayctl start php -all
Stop All MariaDB Versions
servbayctl stop mariadb -all
Restart Redis Service
servbayctl restart redis -all
Check Caddy Service Status
servbayctl status caddy -all
Stop All Running Services
servbayctl stop-all
Notes
- Using the
-all
parameter can operate on all versions of the specified service. - The
version
parameter is used to specify a particular version of a service. - For some operations, such as
kill
andstop-all
, use with caution to avoid unintended service interruptions.