How do I restart an application?

Александр Поволоцкий tarkhil at over.ru
Mon Mar 4 13:13:13 UTC 2019


Sounds nice. I'd like also commands "restart" and "graceful" as 
different ones.

On 04.03.2019 16:11, Valentin V. Bartenev wrote:
> On Monday 04 March 2019 12:34:52 Александр Поволоцкий wrote:
>> Hello
>>
>> Do I have any way to restart specific application in unit? Or I have to
>> restart unitd at all? I think some command like 'apachectl graceful'
>> should exist/
>>
> [..]
>
> Currently the best way to restart an application is something like this:
>
>    curl -X PUT -d "{\"gen\":\"$RANDOM\"}" \
>         --unix-socket /var/run/control.unit.sock \
>         /config/applications/<name>/environment
>
> The more straightforward API is planned, for example:
>
>    curl --unix-socket /var/run/control.unit.sock \
>         /control/applications/<name>/restart
>
>
>    wbr, Valentin V. Bartenev
>
> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit


More information about the unit mailing list