service: Services
The service utility is used to manage services on the Plesk server
through CLI. By using this utility, you can perform the following tasks:
displaying a list of available services
starting, stopping, or restarting a service
querying the current running status of a service
specifying the information to be included in the list of available services and format its display parameters
Usage
service <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command displays detailed information about the dns and mail services as a table:
plesk bin service --list -include dns,mail -format "\n\t%k,\t%N,\t%S\t%I\t%p\n"
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
<service_name> |
Starts a service. |
To start the DNS service: plesk bin service --start dns or plesk bin service -s dns |
|
<service_name> |
Stops a service. |
To stop the DNS service: plesk bin service --stop dns or plesk bin service -p dns |
|
<service_name> |
Restarts a service. |
To restart the DNS service: plesk bin service --restart dns or plesk bin service -r dns |
|
<service_name> |
Displays the current status of a service. |
To view the current status of the DNS service: plesk bin service --status dns or plesk bin service -t dns |
|
Displays information about available services. Can be used with the |
To view the list of available services: plesk bin service --list or plesk bin service -l |
|
|
Displays help on the use of the utility. |
To view help on the use of the utility: plesk bin service --help or plesk bin service -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies the list of services to be included in the |
To view detailed information about DNS and Mail services only: plesk bin service -l -include dns,mail -detail |
|
|
Specifies the list of services to be excluded from the
|
To view detailed information about all services excluding DNS and Mail services: plesk bin service -l -exclude dns,mail -detail |
|
Set the detailed format for the |
||
|
use |
Specifies the information to be included in the detailed output
and the display parameters of the
Is set to |
To view detailed information about DNS and Mail services as a table: plesk bin service -l -include dns,mail -format "\n\t%k,\t%N,\t%S\t%I\t%p\n" |