SHARE
TWEET

waitlist update script

SpeedProg Apr 20th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. echo "Changed directory to /opt/waitlist"
  2. #stop the waitlist
  3. ./stop.sh
  4. echo "Stopped waitlist"
  5. #./cleanup.sh
  6.  
  7. if [ -f stattool_config.js ]; then
  8.   rm stattool_config.js
  9. fi
  10. cp static/js/config/stattool_config.js ./
  11.  
  12. if [ -f gong-sound.mp3 ]; then
  13.   rm gong-sound.mp3
  14. fi
  15. cp static/gong-sound.mp3 ./
  16. echo "Backed up gong-sound.mp3 and stattool_config.js"
  17. rm -rf static/gen/ static/js static/css migrations/ templates/ themes/ waitlist translations
  18. # extract new files
  19. tar -xzf wl-current.tar.gz
  20. echo "Extracted waitlist files"
  21. mv stattool_config.js static/js/config/
  22. echo "Restored stattool_config.js"
  23. mv gong-sound.mp3 static/
  24. echo "Restored gong-sound.mp3"
  25. # get into python venv
  26. source /opt/python-env/waitlist37/bin/activate
  27. echo "Python VENV activated"
  28. pip install -q -r requirements.txt
  29. echo "Requirements updated"
  30. npm i
  31. echo "Node requirements updated"
  32. pybabel compile -d translations
  33. echo "Translations compiled"
  34. # upgrade db schema
  35. python manager.py db upgrade
  36. echo "Database migrations ran"
  37. # start wl and write pid to file
  38. PIDFile="current.pid"
  39. nohup python main.py >> stdfiles.out  2>&1 &
  40. echo $! > "$PIDFile"
  41. echo "Waitlist started"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top