Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # config here:
- MS_MAPFILE="bmn1.map"
- MAPSERVER_BINARY="mapserv"
- # print usage
- if [ $# -lt 1 ]
- then
- echo "usage: $0 [filename]" >&2
- exit 1
- fi
- # check if desired file exists
- FILE=$1
- #!/bin/sh
- # config here:
- MS_MAPFILE="bmn1.map"
- MAPSERVER_BINARY="mapserv"
- # print usage
- if [ $# -lt 1 ]
- then
- echo "usage: $0 [filename]" >&2
- exit 1
- fi
- # check if desired file exists
- FILE=$1
- if [ -r $FILE ]
- then
- # find out size of file
- size=$(stat -c %s $FILE)
- # set needed values
- REQUEST_METHOD=POST
- export REQUEST_METHOD
- CONTENT_LENGTH=$size
- export CONTENT_LENGTH
- export MS_MAPFILE
- # execute mapserver
- cat $1 | $MAPSERVER_BINARY
- ######## DEBUG ##########
- #gdb $MAPSERVER_BINARY
- #cat $1 > fifo &
- else
- echo "File $FILE does not exist." >&2
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement