Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Created July 17, 2023 06:44
Show Gist options
  • Select an option

  • Save asilbalaban/f4a72543e3f450d895c0e51aeb17e865 to your computer and use it in GitHub Desktop.

Select an option

Save asilbalaban/f4a72543e3f450d895c0e51aeb17e865 to your computer and use it in GitHub Desktop.

Revisions

  1. asilbalaban created this gist Jul 17, 2023.
    8 changes: 8 additions & 0 deletions run.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/bash
    if ps aux | grep script.py | grep -v grep > /dev/null
    then
    echo "The script is running."
    else
    echo "The script is not running."
    /usr/bin/python3 ~/teklif-botu/script.py
    fi