Changes between Version 24 and Version 25 of InstallationGuidelines/Linux/Server/CherokeePostgreSQL


Ignore:
Timestamp:
01/27/12 23:28:10 (10 years ago)
Author:
Praneeth Bodduluri
Comment:

Added scripts for starting stopping and reloading uwsgi

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Linux/Server/CherokeePostgreSQL

    v24 v25  
    469469chmod +x /usr/local/bin/w2p
    470470
     471cat << EOF > "/usr/local/bin/reload-uwsgi"
     472#!/bin/bash
     473set -e
     474
     475if [[ -z "$1" ]]; then
     476    echo >&2 "Instance needs to be specified: prod, dev, test or train"
     477    exit 1
     478elif [[ ! -d "/home/rms/$1" ]]; then
     479    echo >&2 "$1 is not a valid instance!"
     480    exit 1
     481fi
     482
     483INSTANCE=$1
     484
     485/etc/init.d/uwsgi-$INSTANCE reload
     486EOF
     487chmod +x /usr/local/bin/reload-uwsgi
     488
     489cat << EOF > "/usr/local/bin/start-uwsgi"
     490#!/bin/bash
     491set -e
     492
     493if [[ -z "$1" ]]; then
     494    echo >&2 "Instance needs to be specified: prod, dev, test or train"
     495    exit 1
     496elif [[ ! -d "/home/rms/$1" ]]; then
     497    echo >&2 "$1 is not a valid instance!"
     498    exit 1
     499fi
     500
     501INSTANCE=$1
     502
     503/etc/init.d/uwsgi-$INSTANCE start
     504EOF
     505chmod +x /usr/local/bin/start-uwsgi
     506
     507
     508cat << EOF > "/usr/local/bin/stop-uwsgi"
     509#!/bin/bash
     510set -e
     511
     512if [[ -z "$1" ]]; then
     513    echo >&2 "Instance needs to be specified: prod, dev, test or train"
     514    exit 1
     515elif [[ ! -d "/home/rms/$1" ]]; then
     516    echo >&2 "$1 is not a valid instance!"
     517    exit 1
     518fi
     519
     520INSTANCE=$1
     521
     522/etc/init.d/uwsgi-$INSTANCE stop
     523EOF
     524chmod +x /usr/local/bin/stop-uwsgi
     525
     526
     527
    471528# END
    472529}}}