3 # This section should match your Makefile
10 INPUTDIR
=$BASEDIR/content
11 OUTPUTDIR
=$BASEDIR/output
12 CONFFILE
=$BASEDIR/pelicanconf.py
15 # Don't change stuff below here unless you are sure
18 SRV_PID
=$BASEDIR/srv.pid
19 PELICAN_PID
=$BASEDIR/pelican.pid
22 echo "usage: $0 (stop) (start) (restart)"
23 echo "This starts pelican in debug and reload mode and then launches"
24 echo "A pelican.server to help site development. It doesn't read"
25 echo "your pelican options so you edit any paths in your Makefile"
26 echo "you will need to edit it as well"
31 kill -0 $1 >/dev
/null
2>&1
36 if [[ $?
-eq 0 ]]; then
38 echo "Killing pelican.server"
41 echo "Stale PID, deleting"
45 echo "pelican.server PIDFile not found"
48 PID
=$
(cat $PELICAN_PID)
49 if [[ $?
-eq 0 ]]; then
51 echo "Killing Pelican"
54 echo "Stale PID, deleting"
58 echo "Pelican PIDFile not found"
63 echo "Starting up Pelican and pelican.server"
65 $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS &
67 echo $pelican_pid > $PELICAN_PID
69 $PY -m pelican.server
&
71 echo $srv_pid > $SRV_PID
74 if ! alive
$pelican_pid ; then
75 echo "Pelican didn't start. Is the pelican package installed?"
77 elif ! alive
$srv_pid ; then
78 echo "pelican.server didn't start. Is the pelican package installed?"
81 echo 'Pelican and pelican.server processes now running in background.'
87 [[ $# -ne 1 ]] && usage
88 if [[ $1 == "stop" ]]; then
90 elif [[ $1 == "restart" ]]; then
93 elif [[ $1 == "start" ]]; then