コマンドラインツール servbayctl
servbayctl
はコマンドラインツールで、開発者がコマンドラインで ServBay サービスを操作するための方法を提供します。servbayctl
を使用すると、サービスの開始、停止、再読み込み、再起動、強制終了、ステータス確認、およびすべてのサービスの停止が可能です。以下は servbayctl
の使用ガイドです。
サポートされるコマンドとパラメータ
servbayctl
は次のコマンドとパラメータをサポートします:
Usage: servbayctl {start|stop|reload|restart|kill|status|stop-all} {php|mariadb|pgsql|redis|memcached|caddy|dnsmasq} [-all|version]
1
基本コマンド
以下は servbayctl
の基本コマンドおよび例です:
サービスの開始
指定したサービスを開始する。
bash
servbayctl start {サービス名} [-all|version]
1
例:PHP 7.4 サービスの開始
bash
servbayctl start php 7.4
1
サービスの停止
指定したサービスを停止する。
bash
servbayctl stop {サービス名} [-all|version]
1
例:PHP 7.4 サービスの停止
bash
servbayctl stop php 7.4
1
サービスの再読み込み
指定したサービスの設定を再読み込みする。
bash
servbayctl reload {サービス名} [-all|version]
1
例:PHP 7.4 設定の再読み込み
bash
servbayctl reload php 7.4
1
サービスの再起動
指定したサービスを再起動する。
bash
servbayctl restart {サービス名} [-all|version]
1
例:PHP 7.4 サービスの再起動
bash
servbayctl restart php 7.4
1
サービスの強制終了
指定したサービスのプロセスを強制終了する。
bash
servbayctl kill {サービス名} [-all|version]
1
例:PHP 7.4 サービスプロセスの強制終了
bash
servbayctl kill php 7.4
1
サービスのステータス確認
指定したサービスの稼働状況を確認する。
bash
servbayctl status {サービス名} [-all|version]
1
例:PHP 7.4 サービスのステータス確認
bash
servbayctl status php 7.4
1
すべてのサービスの停止
すべて稼働中のサービスを停止する。
bash
servbayctl stop-all
1
サポートされるサービス
servbayctl
は以下のサービスをサポートします:
- php
- mariadb
- pgsql
- redis
- memcached
- caddy
- dnsmask
操作の例
以下は一般的な操作の例です:
すべての PHP バージョンの開始
bash
servbayctl start php -all
1
すべての MariaDB バージョンの停止
bash
servbayctl stop mariadb -all
1
Redis サービスの再起動
bash
servbayctl restart redis -all
1
Caddy サービスのステータス確認
bash
servbayctl status caddy -all
1
すべて稼働中のサービスの停止
bash
servbayctl stop-all
1
注意事項
-all
パラメータを使用すると、指定したサービスのすべてのバージョンに対して操作を行うことができます。version
パラメータは、特定のバージョンのサービスを指定するために使用します。kill
やstop-all
などの特定の操作については、サービスの予期せぬ中断を避けるために注意して使用してください。