Changes

Jump to navigation Jump to search
583 bytes added ,  09:20, 3 April 2017
Line 242: Line 242:     
  <source lang="bash">#!/bin/bash
 
  <source lang="bash">#!/bin/bash
 +
###########################################
 +
#      Restart application services      #
 +
###########################################
 +
 
OK="[\033[01;32m OK \033[01;36m]\033[01;00m"
 
OK="[\033[01;32m OK \033[01;36m]\033[01;00m"
 
FAIL="[\033[01;33m FAIL \033[01;36m]\033[01;00m"
 
FAIL="[\033[01;33m FAIL \033[01;36m]\033[01;00m"
 +
LOG_FILE=/dev/null
    
function check_success {
 
function check_success {
Line 253: Line 258:  
}
 
}
   −
echo -en "\033[01;36m    Restarting Gunicorn ... "
+
 
cat CHANGELOG.md &> /dev/null
+
git pull
 +
cd /home/cpc/cpc
 +
./post_pull.sh
 +
 
 +
echo -e "\033[01;36mRestarting Gunicorn\033[01;00m"
 +
sudo /usr/sbin/service gunicorn restart &> ${LOG_FILE}
 +
check_success
 +
 
 +
echo -e "\033[01;36mRestarting Daphne\033[01;00m"
 +
sudo /usr/sbin/service daphne restart &> ${LOG_FILE}
 +
check_success
 +
 
 +
echo -e "\033[01;36mRestarting Celery\033[01;00m"
 +
sudo /usr/sbin/service celery restart &> ${LOG_FILE}
 +
check_success
 +
 
 +
echo -e "\033[01;36mRestarting CeleryBeat\033[01;00m"
 +
sudo /usr/sbin/service celerybeat restart &> ${LOG_FILE}
 
check_success
 
check_success
 
</source>
 
</source>

Navigation menu