2018-10-10 08:46:09 +02:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
|
|
|
|
##
|
2018-10-10 09:30:56 +02:00
|
|
|
## Installetion script for GeoStat
|
|
|
|
## Alexey Nizhegolenko 2018
|
2018-10-10 08:46:09 +02:00
|
|
|
##
|
|
|
|
|
|
|
|
echo "Creating virtual ENV and installing requirements..."
|
|
|
|
virtualenv venv && source venv/bin/activate
|
2018-10-10 09:30:56 +02:00
|
|
|
sleep 1
|
2018-10-10 08:46:09 +02:00
|
|
|
|
2018-10-10 09:30:56 +02:00
|
|
|
pip install -r requirements.txt && deactivate
|
|
|
|
sleep 1
|
2018-10-10 08:46:09 +02:00
|
|
|
|
2018-10-10 09:30:56 +02:00
|
|
|
echo "Please edit settings.ini file and set right parameters..."
|
2018-10-10 08:46:09 +02:00
|
|
|
cp settings.ini.back settings.ini
|
|
|
|
|
|
|
|
"${VISUAL:-"${EDITOR:-vi}"}" "settings.ini"
|
|
|
|
|
2018-10-10 09:30:56 +02:00
|
|
|
|
|
|
|
echo "Installing SystemD service..."
|
2018-10-10 08:46:09 +02:00
|
|
|
while read line
|
|
|
|
do
|
|
|
|
eval echo "$line"
|
|
|
|
done < "./geostat.service.template" > /lib/systemd/system/geostat.service
|
|
|
|
|
|
|
|
systemctl enable geostat.service
|
2018-10-10 09:30:56 +02:00
|
|
|
sleep 1
|
2018-10-10 08:46:09 +02:00
|
|
|
|
|
|
|
echo "All done, now you can start getting GEO data from your log"
|
2018-10-10 09:30:56 +02:00
|
|
|
echo "run 'systemd start geostat.service' for this"
|
|
|
|
echo "Good Luck !"
|