[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Systemd no m'atura un servei



Hola Narcis,

> Tinc aquest fitxer enregistrat: /etc/systemd/system/eventoj.service
> I l'acció ExecStart és cridada tant quan s'inicia el sistema com quan
> s'executa: systemctl start eventoj
> Però l'acció ExecStopPost no és cridada en aturar el sistema ni tampoc
> en executar manualment: systemctl stop eventoj

Jo diria que has d'utilitzar ExecPost. He buscat ExecStop a
/lib/systemd/system/*.service i hi ha uns quants serveis que ho
utilitzen, així que jo crec que hauria de funcionar.

El servei ssh ho fa diferent i utilitza KillMode=process, potser
et serveix com alternativa.

> (també ho he provat amb ExecStop, que només s'utilitza per quan s'ha
> iniciat abans)

Això no ho entenc. Per què vols que s'aturi si no s'ha iniciat
abans?

Salut,
Alex

Attachment: signature.asc
Description: PGP signature


Reply to: