Linux

Killing CouchDB on Ubuntu 10.04

I Wanted to do some maintenance and move my couchdb data files to another partition but couchdb would not stop when I called the usual stop commands:

1)sudo /etc/init.d/couchdb stop
2)sudo service couchdb stop

Found a lot of posts and out of all of them found this nice tidbit below:

ps -U couchdb -o pid= | xargs kill -9

 

Note: It’s not the best thing to viciously kill a process. I imagine databases usually have shutdown tasks to do, must end with current insertions, etc. I’ll post if I find a bug fix.

 

Reverse Proxy in Apache2 (Ubuntu 10.04) for CouchDB

Installing Modules

There are various sites with instructions that did not work.
However, following the instructions here> http://abhirama.wordpress.com/2008/11/03/apache-mod_proxy-in-ubuntu/ did the trick.

The reverse proxy module was installed:

sudo apt-get install libapache2-mod-proxy-htm

Libxml was installed:

apt-get install libxml2-dev

More

Combine FLV/MP4 Videos Together

Hey, a quick post about a script I wrote for combining together multiple video files.
It’s based on a post from: http://www.webupd8.org/2009/05/join-and-split-files-including-video-in.html

 

Steps during execution

1) The script converts all mp4 and flv files to MPG files.

2) This is done in order to use the CAT command with > to send all the bytes from all files into one location output.mpg.

3) Finally we convert output.mpg  to MP4 and have the final file.

NOTE: I will check into using possible shortcuts to speed up the process.

#!/bin/bash
echo
echo
echo Combine Videos Together
echo based on http://www.webupd8.org/2009/05/join-and-split-files-including-video-in.html
echo ----------------------------------------------------------
sleep 3
for i in *.mp4; do
 if [ -e "$i" ]; then
   file=`basename "$i" .mp4`
   echo converting "$i" to "$file.mpg"
   ffmpeg -i "$i" -sameq "$file.mpg"
 fi
done

for i in *.flv; do
 if [ -e “$i” ]; then
   file=`basename “$i” .flv`
   echo converting “$i” to “$file.mpg”
   ffmpeg -i “$i” -sameq “$file.mpg”
 fi
done

mkdir temp
mv *.mpg temp
cd temp
cat * > output.mpg
ffmpeg -i output.mpg -sameq final.mp4