Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 46 lines (35 sloc) 1.15 kb
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
#
# install.sh
# Sun Nov 22 20:46:43 -0200 2009
#

dir=`pwd`
apt-get install -y cronolog
gem install tweetstream redis prowl fcoury-gmail tlsmail --no-rdoc --no-ri

cd /usr/src
wget -q http://redis.googlecode.com/files/redis-1.02.tar.gz
tar xzvf redis-1.02.tar.gz
cd redis-1.02/
make -j
cp redis.conf /etc
ln -s /usr/src/redis-1.02/redis-server /usr/bin/redis-server
ln -s /usr/src/redis-1.02/redis-cli /usr/bin/redis-cli

echo "
daemonize no
logfile stdout" >> /etc/redis.conf
echo "nohup /usr/bin/redis-server /etc/redis.conf | /usr/bin/cronolog /var/log/redis/redis.%Y-%m-%d.log 2>&1 &" > /etc/init.d/redis.sh

chmod +x /etc/init.d/redis.sh
bash -c "nohup /usr/bin/redis-server /etc/redis.conf | /usr/bin/cronolog /var/log/redis/redis.%Y-%m-%d.log 2>&1 &"
sed -i "s/loglevel debug/loglevel notice/g" /etc/redis.conf

cd $dir
mkdir log

echo "#! /bin/bash
cd $dir
ruby producer.rb start
ruby consumer.rb start" > /etc/init.d/intweet.sh

echo "#! /bin/bash
ruby producer.rb stop
ruby consumer.rb stop" > stop

chmod +x /etc/init.d/intweet.sh
chmod +x stop

nohup /etc/init.d/redis.sh > /dev/null 2>&1
nohup /etc/init.d/intweet.sh > /dev/null 2>&1

Something went wrong with that request. Please try again.