unit
unit copied to clipboard
CLI: New subcommand for restarting applications
A new subcommand unitctl app restart <name>
to restart the application.
Given the following unit config:
{
"applications": {
"hello-world": {
"type": "php",
"root": "/www/hw/public/",
"script": "index.php",
"environment": {
"PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
}
},
"other-one": {
"type": "php",
"root": "/www/oo/public/",
"script": "index.php",
"environment": {
"PHP_INI_SCAN_DIR": ":/tmp/php.inis/"
}
}
}
}
<name>
would either be hello-world
or other-one
. Everything else should return an error.
It would call this endpoint to restart the application in question: https://unit.nginx.org/configuration/#process-management