-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
64 lines (57 loc) · 1.77 KB
/
install.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
cp start.sh start_tp.sh
cp restart.sh restart.tp.sh
read -p "Do you want to download all Python dependencies? [yes/no]: " yn
case $yn in
[Yy]* )
pip install -r requirements.txt
# The Tweepy API changed in current versions
#pip install git+git://github.com/tweepy/tweepy/@master
;;
[Nn]* ) ;;
* ) echo "Please answer yes or no.";;
esac
read -p "Do you want to install a default cronjob for the Dashboard? [yes/no]: " yn
case $yn in
[Yy]* )
crontab -l > current_crons
echo "*/10 * * * * bash -c \"cd $PWD && python TweetPinnaGraphs.py cfg/TweetPinnaDefault.cfg\"" >> current_crons
crontab current_crons
rm current_crons
;;
[Nn]* ) ;;
* ) echo "Please answer yes or no.";;
esac
read -p "Do you want to install a default cronjob for retrieving timelines? [yes/no]: " yn
case $yn in
[Yy]* )
crontab -l > current_crons
echo "*/10 * * * * bash -c \"cd $PWD && python TweetPinnaTimeline.py cfg/TweetPinnaDefault.cfg\"" >> current_crons
crontab current_crons
rm current_crons
;;
[Nn]* ) ;;
* ) echo "Please answer yes or no.";;
esac
read -p "Do you want to install a default cronjob for retrieving replies? [yes/no]: " yn
case $yn in
[Yy]* )
crontab -l > current_crons
echo "*/30 * * * * bash -c \"cd $PWD && python TweetPinnaReplies.py cfg/TweetPinnaDefault.cfg 250\"" >> current_crons
crontab current_crons
rm current_crons
;;
[Nn]* ) ;;
* ) echo "Please answer yes or no.";;
esac
read -p "Do you want to install a default cronjob for automated restart? [yes/no]: " yn
case $yn in
[Yy]* )
crontab -l > current_crons
echo "*/30 * * * * bash -c \"cd $PWD && bash restart_tp.sh\"" >> current_crons
crontab current_crons
rm current_crons
;;
[Nn]* ) ;;
* ) echo "Please answer yes or no.";;
esac