Created
          July 23, 2021 16:10 
        
      - 
      
- 
        Save liquidgenius/c49d960772df0181d3f3fd33c3378328 to your computer and use it in GitHub Desktop. 
Revisions
- 
        liquidgenius revised this gist Jul 23, 2021 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ #! /bin/bash # License: MIT; https://opensource.org/licenses/MIT # Version: 0.0.1 # Maintainer: https://gist.github.com/liquidgenius # Given a script main.py on an ubuntu machine in /home/ubuntu/app/src directory with the interpreter # in /home/ubuntu/app/.venv directory in project. This script, run.sh, would be placed in the # /home/ubuntu/app directory. 
- 
        liquidgenius created this gist Jul 23, 2021 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #! /bin/bash # Given a script main.py on an ubuntu machine in /home/ubuntu/app/src directory with the interpreter # in /home/ubuntu/app/.venv directory in project. This script, run.sh, would be placed in the # /home/ubuntu/app directory. # Consider adding run.sh to the Crontab to be run at 10 minute intervals with: # crontab -e # */10 * * * * cd /home/ubuntu/app && sudo sh run.sh appname="app" projdir="/home/ubuntu/$appname" cd "$projdir/src" PATH=/usr/local/bin:$PATH pipenv run "$projdir/.venv/bin/python" "$projdir/src/main.py" exit 0