Last active
April 17, 2018 15:03
-
-
Save Mierenga/6e4710a4f4c9383a683a32af558de94c to your computer and use it in GitHub Desktop.
This file contains 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 characters
APP=apptemplate | |
# kill any running instance │ | |
~/$APP/kill.sh │ | |
# setup log ownership | |
sudo chown pi /var/$APP/log │ | |
sudo chown pi /var/$APP/tmp │ | |
touch /var/$APP/log/node.log │ | |
touch /var/$APP/log/node.err │ | |
touch /var/$APP/log/python.log | |
# clear cached photos | |
rm -r /var/$APP/tmp/photo/* │ | |
│ | |
################# │ | |
# NODE SERVICE # │ | |
################# │ | |
cd ~/$APP/src/node │ | |
node app.js > /var/$APP/log/node.log 2>&1 & │ | |
│ | |
│ | |
################# │ | |
# PYTHON APP # │ | |
################# │ | |
cd ~/$APP/src/python/ │ | |
# run with -u for unbuffered (always flushed) logging │ | |
pipenv run python3 -u app.py > /var/$APP/log/python.log 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment