Upto
ImcUkTech
UK Kosmos Tasks
Updating templates
The templates and Mir code are checked out as an anon user on kosmos.
To update the setup_uk templates (to update just one file or directory specify that - updating everything could be dangerous if someone has committed broken stuff...)
$ cd /var/www/uk.indymedia.de/setup_uk/
$ sudo -u uk cvs up -dP
Then you need to run ant:
$ cd /var/www/uk.indymedia.de/mir
$ sudo -u uk ant
And then set off jobs in the admin interface as needs be.
Fixing hung syncs
First see what is running:
If a sync is running you should get something like this:
100 S 33 21757 21587 0 76 0 - 514 114fef pts/48 00:00:00 rsync-uk-fast
040 S 33 21758 21757 0 76 0 - 547 114fef pts/48 00:00:00 rsync-uk-fast
000 S 33 21795 21758 0 99 19 - 386 14bdfa pts/48 00:00:00 rsync
Before killing a hung sync job and manually setting one off please cancel upcomming syncs in the admin interface -- you don't want one to start just before you set one off.
Then kill the uk sync and delete the lock file:
$ sudo killall rsync-uk-fast
$ sudo rm /tmp/rsynclock.uk.ahimsa
Then manually run a full sync:
$ cd /home/uk/bin
$ sudo -u www-data ./rsync-uk-full
Restarting tomcat
You shouldn't need to do this... but... if you do:
$ sudo /etc/init.d/tomcat4 restart
Sometimes it doesn't restart properly and it's better to stop (repeat stop till it is really stopped) it and then start it:
$ sudo /etc/init.d/tomcat4 stop
$ sudo /etc/init.d/tomcat4 start
Cities list updating
This is done with a shell script in /home/uk/bin which does this:
#!/bin/bash
# This is a quick hack based on this:
# http://lists.cat.org.au/pipermail/catgeek/2003-March/004013.html
# make a backup
# mv /home/uk/setup_uk/etc/producer/cities.inc /home/uk/bak/cities-`date +%d-%m-%y`
# get a new list
wget -q -O /home/uk/cities.inc http://www.indymedia.org/cities.inc
# copy it
cp /home/uk/cities.inc /var/www/uk.indymedia.de/site/cities.inc
To run it on the command line do this:
$ cd /home/uk/bin/
$ sudo -u uk ./cities-update.sh
This script id run via cron, to edit this:
$ sudo -u uk crontab -e
0 06 * * * /home/uk/bin/cities-update.sh
to top