Skip to content

Instantly share code, notes, and snippets.

@kristapsk
Created August 30, 2022 09:43
Show Gist options
  • Save kristapsk/b8388d5f1f9831ce288153a6a030d51c to your computer and use it in GitHub Desktop.
Save kristapsk/b8388d5f1f9831ce288153a6a030d51c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
lockdir=/tmp/satsale.lock
if mkdir "$lockdir" 2> /dev/null ; then
trap 'rm -rf "$lockdir"' 0
trap "exit 2" 1 2 3 15
else
exit 0
fi
cd ~/git/SatSale
unbuffer ~/.local/bin/gunicorn -w 1 -b 127.0.0.1:8000 satsale:app >> ~/critical/log/SatSale.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment