Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    And may be try withouth the -9 to let the process terminate in an orderly fashion. The default SIGTERM should do the trick. Use SIGKILL (-9) as a last resort only. Commented Feb 23, 2023 at 7:31
  • Thank you for that, I have added it into the script. But I am not sure how to create a status/stop/start like that of systemctl to make this work in a single script. Commented Feb 23, 2023 at 7:38
  • @PritiPatel You could try checking what arguments the script was invoked with using $# and shift Commented Feb 23, 2023 at 13:38