Jump to content

PopBot

Member
  • Posts

    1
  • Joined

  • Last visited

Reputation Activity

  1. Like
    PopBot reacted to vitor in Kill Process (PID) by String Program Name   
    Welcome @PopBot,
     
    You should be able to simplify the Run Script immensely to essentially a single line: pkill -9 -if "${1}". There’s no need for pgrep as an intermediary as pkill does the job with names. You also don’t need to check if any argument was given, because in the Keyword Input you’re already telling it Argument Required so it won’t work unless the user types something.

    Because -9 is quite aggressive, I’d recommend using Alternative Actions to either kill with -15 or -9. That’s up to you, though.
     
     
    The process is “pull”, as opposed to “push”.
×
×
  • Create New...