diff --git a/pelican/tools/templates/develop_server.sh.in b/pelican/tools/templates/develop_server.sh.in index 732069c2..49f8b1d9 100755 --- a/pelican/tools/templates/develop_server.sh.in +++ b/pelican/tools/templates/develop_server.sh.in @@ -65,6 +65,13 @@ function start_up(){ $$PELICAN --debug --autoreload -r $$INPUTDIR -o $$OUTPUTDIR -s $$CONFFILE $$PELICANOPTS & pelican_pid=$$! echo $$pelican_pid > $$PELICAN_PID + + #Wait loop till the output directory created since pelican server runs at the background + while [ ! -e $$OUTPUTDIR ]; + do + sleep 1 + done + cd $$OUTPUTDIR $PY -m pelican.server $$port & srv_pid=$$!