Minor wording changes in develop_server.sh

This commit is contained in:
Justin Mayer 2013-12-11 21:09:02 -08:00
commit 3715749cc6

View file

@ -19,10 +19,10 @@ PELICAN_PID=$$BASEDIR/pelican.pid
function usage(){ function usage(){
echo "usage: $$0 (stop) (start) (restart) [port]" echo "usage: $$0 (stop) (start) (restart) [port]"
echo "This starts pelican in debug and reload mode and then launches" echo "This starts Pelican in debug and reload mode and then launches"
echo "A pelican.server to help site development. It doesn't read" echo "an HTTP server to help site development. It doesn't read"
echo "your pelican options so you edit any paths in your Makefile" echo "your Pelican settings, so if you edit any paths in your Makefile"
echo "you will need to edit it as well" echo "you will need to edit your settings as well."
exit 3 exit 3
} }
@ -34,14 +34,14 @@ function shut_down(){
PID=$$(cat $$SRV_PID) PID=$$(cat $$SRV_PID)
if [[ $$? -eq 0 ]]; then if [[ $$? -eq 0 ]]; then
if alive $PID; then if alive $PID; then
echo "Killing pelican.server" echo "Stopping HTTP server"
kill $$PID kill $$PID
else else
echo "Stale PID, deleting" echo "Stale PID, deleting"
fi fi
rm $$SRV_PID rm $$SRV_PID
else else
echo "pelican.server PIDFile not found" echo "HTTP server PIDFile not found"
fi fi
PID=$$(cat $$PELICAN_PID) PID=$$(cat $$PELICAN_PID)
@ -60,7 +60,7 @@ function shut_down(){
function start_up(){ function start_up(){
local port=$$1 local port=$$1
echo "Starting up Pelican and pelican.server" echo "Starting up Pelican and HTTP server"
shift shift
$$PELICAN --debug --autoreload -r $$INPUTDIR -o $$OUTPUTDIR -s $$CONFFILE $$PELICANOPTS & $$PELICAN --debug --autoreload -r $$INPUTDIR -o $$OUTPUTDIR -s $$CONFFILE $$PELICANOPTS &
pelican_pid=$$! pelican_pid=$$!
@ -72,13 +72,13 @@ function start_up(){
cd $$BASEDIR cd $$BASEDIR
sleep 1 sleep 1
if ! alive $$pelican_pid ; then if ! alive $$pelican_pid ; then
echo "Pelican didn't start. Is the pelican package installed?" echo "Pelican didn't start. Is the Pelican package installed?"
return 1 return 1
elif ! alive $$srv_pid ; then elif ! alive $$srv_pid ; then
echo "pelican.server didn't start. Is there something else which uses port 8000?" echo "The HTTP server didn't start. Is there another service using port 8000?"
return 1 return 1
fi fi
echo 'Pelican and pelican.server processes now running in background.' echo 'Pelican and HTTP server processes now running in background.'
} }
### ###
@ -95,7 +95,7 @@ elif [[ $$1 == "restart" ]]; then
start_up $$port start_up $$port
elif [[ $$1 == "start" ]]; then elif [[ $$1 == "start" ]]; then
if ! start_up $$port; then if ! start_up $$port; then
shut_down shut_down
fi fi
else else
usage usage