Changes between Version 7 and Version 8 of InstallDiscoveryBrowse


Ignore:
Timestamp:
14/08/07 16:35:47 (12 years ago)
Author:
pjkersha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallDiscoveryBrowse

    v7 v8  
    164164Now open the file in NDGServices/ows_server/ows_server/config called ndgDiscovery.config, and change the 'repository' and 'server' urls to match your server. 
    165165 
    166 Now change directory back to the NDGServices directory: 
    167 {{{ 
    168 cd /usr/local/NDGServices 
     166Now ensure you are in the NDG Services config directory: 
     167{{{ 
     168cd /etc/ndg/ows_server/conf 
    169169}}} 
    170170 
     
    196196#!/bin/sh -e 
    197197 
     198export PYTHON_EGG_CACHE=/tmp 
     199PID=/etc/ndg/ows_server/run/paster.pid 
     200INI=/etc/ndg/ows_server/conf/development.ini 
     201LOG=/etc/ndg/ows_server/logs/paster.log 
     202PROG=/usr/local/bin/paster 
     203 
     204status() 
     205{ 
     206    local pid= 
     207     
     208    # Get pid from PID file 
     209    local pidFound= 
     210    if [ -f $PID ] ; then 
     211        pid=$(cat $PID) 
     212        if [ -z "$pid" ]; then 
     213            echo $"Can't get pid from pid file $PID" 
     214            return 
     215        fi 
     216        pidFound=Yes 
     217    fi 
     218 
     219    # look for pid in listing 
     220    for i in `pidof -o $$ -o $PPID -o %PPID -x "${PROG}"`; do 
     221        [[ $i = $pid ]] && pidFound=Yes && break; 
     222    done 
     223     
     224    if [ -n "$pidFound" ]; then 
     225        echo $"$prog (pid $pid) is running..." 
     226 
     227    elif [ -f ${PID} ]; then 
     228        echo $"$prog is dead but pid file $PID exists" 
     229    else 
     230        echo $"$prog is dead" 
     231    fi 
     232} 
     233 
    198234case "$1" in 
    199235  start) 
    200     paster serve --daemon --reload --pid-file=/usr/local/NDGServices/paster.pid --log-file=/usr/local/NDGServices/paster.log /usr/local/NDGServices/ows_server/development.ini star 
    201 t 
     236    ${PROG} serve --daemon --reload --pid-file=$PID --log-file=$LOG $INI 
    202237    ;; 
    203238  stop) 
    204     paster serve --daemon --reload --pid-file=/usr/local/NDGServices/paster.pid --log-file=/usr/local/NDGServices/paster.log /usr/local/NDGServices/ows_server/development.ini stop 
     239    ${PROG} serve --stop-daemon --pid-file=$PID 
    205240    ;; 
    206241  restart) 
    207     paster serve --daemon --reload --pid-file=/usr/local/NDGServices/paster.pid --log-file=/usr/local/NDGServices/paster.log /usr/local/NDGServices/ows_server/development.ini rest 
    208 art 
     242    ${PROG} serve --stop-daemon --pid-file=$PID 
     243    ${PROG} serve --daemon --reload --pid-file=$PID --log-file=$LOG $INI 
     244    ;; 
     245  status) 
     246    status 
    209247    ;; 
    210248  *) 
    211     echo $"Usage: $0 {start|stop|restart}" 
     249    echo $"Usage: $(basename $0) {start|stop|restart|status}" 
    212250    exit 1 
    213251esac 
    214252}}} 
    215253 
    216 you can then start/restart/stop it using: 
     254you can then start/restart/stop/check status using: 
    217255{{{ 
    218256sudo sh /etc/init.d/ndgservices start 
    219257sudo sh /etc/init.d/ndgservices restart 
    220258sudo sh /etc/init.d/ndgservices stop 
     259sudo sh /etc/init.d/ndgservices status 
    221260}}} 
    222261