forked from rldhont/PyWPS-QGIS-Processing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpywps.cgi
executable file
·26 lines (23 loc) · 944 Bytes
/
pywps.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# Author: René-Luc D'Hont
# Purpose: CGI script for wrapping PyWPS script
# Licence: GNU/GPL
# Usage: Put this script to your web server cgi-bin directory, e.g.
# After adaptation
# /usr/lib/cgi-bin/ and make it executable (chmod 755 pywps.cgi)
# NOTE: tested on linux/apache
# Need a virtuam display
# you can create one with: Xvfb :99 -ac -noreset &
export DISPLAY=:99
# Python path to the QGIS python share and QGIS python plugins share
# you can add your plugins directory
#export PYTHONPATH=/usr/share/qgis/python:/usr/share/qgis/python/plugins
export PYTHONPATH=/usr/share/qgis/python:/home/user/.qgis2/python/plugins:/usr/share/qgis/python/plugins
# Ld Library Path
export LD_LIBRARY_PATH=/usr/lib #:/path/to/qgis/lib if not default
# PyWPS config
export PYWPS_CFG=/path/to/pywps/wps/pywps.cfg
# PyWPS processes directory
export PYWPS_PROCESSES=/path/to/pywps/wps/processes/
# PyWPS wps python script
/path/to/PyWPS/wps.py