Saturday, December 1, 2012

getting started with request tracker and gmail

I had used request tracker at my former work place as a user. This was my first time installing it. Ubuntu 12.04 provided a smooth install experience. The slight surprise here is that the main package is not named rt4 but request-tracker4.

The documents that guided me on this are:
  • Installing Request Tracker 4 on Debian
    This blog gives a good account of installing request tracker on debian for a using a custom email domain.
  • GmailAndExim4 on the debian wiki
    It has a good breakdown of how to setup exim4 to send emails to a smarthost. I adapted the instructions to work with gmail.
  • Gmail POP3 with Fetchmail
    The fetchmail configuration given by the first source does not show how to connect fetchmail via SSL. This document shows a configuration that can be used for gmail.
In my setup, an email is sent to a gmail account (mfano@gmail.com) which fetchmail logs on to and delivers the email to the request tracker queue. Once request tracker has processed the email, it sends it out using a local account address (rt4@localhost). Exim4 takes over at this stage and delivers the email to gmail using smtp.

Still trying to figure out how the comment email will be sent via exim4 as it appears that one account will be used to send all emails that match the google dns.

Default Queue Settings
These were provided in the debconf wizard during the rt installation.

Queue settings (Local email account)











/etc/email-addresses
rt4:mfano@gmail.com
rt4@localhost:
mfano@gmail.com
rt4@app-server:
mfano@gmail.com

/etc/fetchmailrc
poll pop.gmail.com protocol pop3
   username "mfano@gmail.com" password "siri" options ssl
   mda "/usr/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt/"
   no keep
;

/etc/exim4/passwd.client

*.google.com:mfano@gmail.com:siri

Monday, November 19, 2012

Perl script to remove stale PID file

Here's a script for removing a stale PID file. It is my first real world perl script. This also happens to be my first blog this year, following the renaming of this blog from locait.blogspot.com. I had to create this script when apacheds refused to start due to a stale PID file.

#!/usr/bin/perl
# perl script to remove state pid file
# adapted from example at http://search.cpan.org/~cwest/File-Pid-1.01/lib/File/Pid.pm
# it expects the pid file as the sole argument

use File::Pid;
  if ($#ARGV < 0) {
        die "Expects the path to the pid file but received $#ARGV args";
}
  my $pidfile = File::Pid->new({
    file => "$ARGV[0]",
  });

  if (! $pidfile->running ) {
      $pidfile->remove;
  }

Thursday, September 29, 2011

Mounting a webdav url with davfs2

I found a very useful article online and my points of departure from the author's directions are summarised as a comment on the article and also quoted below.
Many thanks for the helpful information.
I placed the secrets file in ~/.davfs2/secrets and added an entry to /etc/fstab and it worked well.
Being on a 64bit system, I needed to install the 32 bit version of libneon27 for davfs2 to work.

Thursday, September 22, 2011

Adding new vtapes to amanda and troubleshooting

I needed to add new vtapes to amanda after successfully adding new space via LVM. Using a one line script included in the vtape how-to on the amanda wiki, I created the additional tape directories - slot[m] to slot[n].

After this, I changed the configuration file's tapecycle parameter to reflect the advice by martineau in a zmanda forum post - that tapecycle should be at least runspercycle * runtapes.

On executing amcheck on one of the amanda configurations, I ran into an error - WARNING taper changer error: slot : Slot  is already in use by driveN. This was resolved by deleting the driveN directory as suggested by dustin in another zmanda forum post.

Earlier, an all estimate timed out error had been resolved by adding the directive estimate calcsize to the configuration's dumptype as suggested by paddy in a zmanda forum post.

Monday, September 12, 2011

Screen Capture/Recording with ffmpeg

My attempt to record a video tutorial was failing with the error 'x11grab AVParameters don't have video size and/or rate. Use -s and -r'. This was in response to typing in the following command as based on an example in the ffmpeg man page.

ffmpeg -f x11grab -s 1280x1024 -i :0.0 -r 25 -sameq /tmp/test.mpg

After several failed tries, I determined that the error could be coming from the -r option. I moved it to immediately after the -s option so that both -s and -r options followed the x11grab specification. This time, it worked great. The final command is shown below.

ffmpeg -f x11grab -r 25 -s 1280x1024 -i :0.0 -sameq /tmp/test.mpg

Wednesday, July 20, 2011

Setting up the first LVM partition

Most of the LVM setups I have created have been done by the OS installer. I wanted to add more disk space to a server that did not have any LVM partitions setup. Below are the steps that I took:
  • added the hard disk (it was a virtual hard disk in this case)
  • created a partition and assigned it the lvm partition type id using fdisk
  • created the physical volume
    pvcreate /dev/sdb1
  • created a volume group called system with the earlier created physical volume:
    vgcreate system /dev/sdb1
  • created a logical volume to take up all the free space
    lvcreate -n storage -l 100%FREE system
  • created an ext3 file system on the logical volume
    mkfs.ext3 /dev/system/storage
  • Made an entry in /etc/fstab
    /dev/system/storage /storage ext3 defaults 1 2

Wednesday, May 25, 2011

Creating a patch file with Eclipse 3.5 Git plugin

This process assumes the changes to the file to create a patch from have been committed. The process may not be very different for working changes yet to be committed.

  • Display the Git repository view if it is not visible:
    Window > Show view > Other ... > Git > Git Repositories.
  • Navigate to the desired file. This can be done quickly by turning on the link with editor behavior of this view if the file is open.
  • Right click on the file in the Git repository view and select 'Show in History'.
  • In the history view, right click on the commit that has the desired changes and select 'Create Patch...' then provide a destination for the file in the subsequent dialogs.