geostat/install.sh

33 lines
737 B
Bash
Raw Normal View History

#! /usr/bin/env bash
##
2018-10-10 09:30:56 +02:00
## Installetion script for GeoStat
## Alexey Nizhegolenko 2018
##
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 09:30:56 +02:00
pip install -r requirements.txt && deactivate
sleep 1
2018-10-10 09:30:56 +02:00
echo "Please edit settings.ini file and set right parameters..."
cp settings.ini.back settings.ini
"${VISUAL:-"${EDITOR:-vi}"}" "settings.ini"
2018-10-10 09:30:56 +02:00
echo "Installing SystemD service..."
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
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 !"