title: Systemd write to file after killing service
body: <p>I have my Python script, which is started via systemd .service file (mine is called skriptaRFM.service). In my Python script I write some values in files and when I kill service I want to write in those files some lines. I read on forums about Kill functions in service files but I don't know which one is the right one for me. I have except function in my script but it won't execute it if I stop service.</p>
  
  <p>Can anyone tell me what can I do? Thank you :)</p>