added install.sh and changed some file names
This commit is contained in:
parent
267a40e30e
commit
ea19615599
2 changed files with 29 additions and 4 deletions
|
@ -1,14 +1,13 @@
|
|||
***GeoStat.service***
|
||||
|
||||
[Unit]
|
||||
Description=GeoStat
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/geostat/venv/bin/python geoparser.py
|
||||
ExecStart=$PWD/venv/bin/python geoparser.py
|
||||
User=root
|
||||
WorkingDirectory=/opt/geostat
|
||||
WorkingDirectory=$PWD
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
26
install.sh
Executable file
26
install.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
##
|
||||
## Installetion for GeoStat script
|
||||
##
|
||||
|
||||
echo "Creating virtual ENV and installing requirements..."
|
||||
|
||||
virtualenv venv && source venv/bin/activate
|
||||
|
||||
pip install -r requirements.txt
|
||||
|
||||
cp settings.ini.back settings.ini
|
||||
|
||||
"${VISUAL:-"${EDITOR:-vi}"}" "settings.ini"
|
||||
|
||||
while read line
|
||||
do
|
||||
eval echo "$line"
|
||||
done < "./geostat.service.template" > /lib/systemd/system/geostat.service
|
||||
|
||||
systemctl enable geostat.service
|
||||
|
||||
echo "All done, now you can start getting GEO data from your log"
|
||||
echo "run 'systemd start geostat.service' "
|
||||
echo "Good Luck"
|
Loading…
Reference in a new issue