From a1b9eacc773b1c829d380470605ad61b92b6094e Mon Sep 17 00:00:00 2001 From: Luiz Andrade Date: Thu, 31 Dec 2015 11:18:09 -0200 Subject: [PATCH] New management scripts to install and configure the plugin. --- .../clean_logs.py | 0 ManagementScripts/config.sh | 15 ++++++++ ManagementScripts/install.sh | 34 +++++++++++++++++++ 3 files changed, 49 insertions(+) rename {ShellScripts => ManagementScripts}/clean_logs.py (100%) create mode 100755 ManagementScripts/config.sh create mode 100644 ManagementScripts/install.sh diff --git a/ShellScripts/clean_logs.py b/ManagementScripts/clean_logs.py similarity index 100% rename from ShellScripts/clean_logs.py rename to ManagementScripts/clean_logs.py diff --git a/ManagementScripts/config.sh b/ManagementScripts/config.sh new file mode 100755 index 0000000..8e5223f --- /dev/null +++ b/ManagementScripts/config.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +#copying files +for f in ~/.qgis2/python/plugins/DSGManagementTools/CGI/*.py +do + sudo cp $f /usr/lib/cgi-bin +done + +for f in ~/.qgis2/python/plugins/DSGManagementTools/ShellScripts/*.sh +do + sudo cp $f /usr/lib/cgi-bin +done + +sudo chmod 777 -R /usr/lib/cgi-bin +exit diff --git a/ManagementScripts/install.sh b/ManagementScripts/install.sh new file mode 100644 index 0000000..f3b1dff --- /dev/null +++ b/ManagementScripts/install.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +echo "A conexão é feita com proxy?: (S/N)"; read USEPROXY +if [ "$USEPROXY" == "S" ]; then + echo "Entre com o endereço do proxy: "; read PROXYHOST + echo "Entre com a porta do proxy: "; read PROXYPORT + echo "Entre com o usuário do proxy: "; read PROXYUSER + echo "Entre com o password do proxy: "; read PROXYPASS + + export http_proxy="http://$PROXYUSER:$PROXYPASS@$PROXYHOST:$PROXYPORT" + export https_proxy="http://$PROXYUSER:$PROXYPASS@$PROXYHOST:$PROXYPORT" + + $SUDO = "sudo -E" +elif [ "$USEPROXY" == "N" ]; then + $SUDO = "sudo" +else + echo "Parâmetro inválido! Nada foi feito" + exit +fi + +#preparing QGIS repository +$SUDO add-apt-repository ppa:ubuntugis/ubuntugis-unstable +$SUDO apt-get update + +#installing synaptic +$SUDO apt-get install synaptic + +#installing packages +$SUDO apt-get install qgis saga python-saga otb-bin python-otb otb-bin-qt grass qgis-plugin-grass postgresql postgis slony1-2-bin postgresql-9.3-slony1-2 pgadmin3 apache2 libapache2-mod-python python-qt4-sql libqt4-sql-psql libqt4-sql-sqlite + +#configuring apache2 +sudo a2enmod cgi + +exit