Created
October 29, 2012 23:35
-
-
Save chx/3977347 to your computer and use it in GitHub Desktop.
rtorrent setup on slave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system.method.set_key = event.download.finished,done,"execute=/usr/local/bin/run.sh,$d.get_name=;d.set_directory=/var/www" | |
schedule = watch_directory,1,1,load_start=/root/torrent/watch/*.torrent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@test3:~# cat /usr/local/bin/run.sh | |
#!/bin/sh | |
logger run.sh started with $1 | |
mv /root/torrent/$1 /var/www | |
test.sh $1 2>&1 > /dev/null & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@test3:~# cat /usr/local/bin/test.sh | |
#!/bin/sh | |
own=`hostname -i|sed 's/ /\n/g'|grep -F '10.'` | |
killall -9 mysqld | |
rm -r /dev/shm/mysql | |
mkdir /dev/shm/mysql | |
chown mysql:mysql /dev/shm/mysql | |
mysql_install_db | |
service mysql start | |
logger mysql started | |
mysql -u root -e 'create database drupal' | |
cd /var/www/$1 | |
drush si -y standard --db-url='mysql://root@localhost/drupal' | |
drush ev 'module_enable(array("simpletest"));' | |
chown -R www-data:www-data sites/default/files/ | |
grep -v install_profile sites/default/settings.php > /tmp/x | |
mv /tmp/x sites/default/settings.php | |
while read -r test | |
do | |
logger testing "$test" | |
sudo -u www-data php core/scripts/run-tests.sh --url http://localhost/$1 --class "$test" 2>&1 >> result.txt | |
done < "tests/$own" | |
scp result.txt `cat /etc/ssh/master/ip`:results/$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget
aptitude install screen rtorrent