Command Line Tool servbayctl
servbayctl
is a command line tool that gives developers a way to manage ServBay services through the command line. With servbayctl
, you can start, stop, reload, restart, kill, check status, and stop all services. Below is a detailed guide on how to use servbayctl
.
Supported Commands and Parameters
servbayctl
supports the following commands and parameters:
Usage: /Applications/ServBay/script/servbayctl {start|stop|reload|restart|kill|status|stop-all} {php|mariadb|mysql|pgsql|redis|memcached|caddy|dnsmasq|mongodb|rabbitmq|cloudflared|frpc|mailpit} [-all|version]
Basic Commands
Below 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
Forcefully 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
- mysql
- pgsql
- redis
- memcached
- caddy
- dnsmasq
- mailpit
- mongodb
- nginx
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
- Use the
-all
parameter to perform actions on all versions of the specified service. - The
version
parameter specifies a particular version of the service. - Be cautious with actions like
kill
andstop-all
to avoid unintended service interruptions.