Category Archives: sysadmin

Asterisk: Automatically Update externip When Your IP Address Changes

I got tired of updating Asterisk’s externip setting every time my IP address changed, so I wrote this quick script, saved as /usr/local/bin/asterisk_update_externip: #!/bin/bash ip_url=”http://automation.whatismyip.com/n09230945.asp” oldip=`grep externip /etc/asterisk/sip.conf |sed ‘s/;.*//’ |grep -v ^$ |sed s/.*=\ *//` ip=`curl -s “$ip_url” |head … Continue reading

Posted in sysadmin | 1 Comment

Nagios Plugin to Check Memory

After a search for a check_memory plugin for Nagios turned up only a Korn shell script, I quickly wrote the following in Ruby for Linux, which I hereby release into the public domain.   Why?  All my servers have Ruby, … Continue reading

Posted in sysadmin | 2 Comments

PuTTY SSH / Windows Clipboard Integration

Getting text out of your SSH sessions can be annoying.  If it fits in a screen, I usually just select the text in PuTTY to copy it– no big deal.  Otherwise, I have to either email it to myself or … Continue reading

Posted in sysadmin | 14 Comments

Apt-get upgrade wants to replace my compiled packages.

I was getting some messages from my daily apt-get upgrade script telling me some of my ffmpeg debs needed to be upgraded.  

Posted in sysadmin | Tagged , , | Leave a comment

SOAP4R and SSL: unable to get local issuer certificate

After enabling SSL on a couple of apps, I got an email from one of my cron jobs telling me my SOAP API was no longer working.  (This is why you always want to have an entry in /etc/aliases forwarding … Continue reading

Posted in sysadmin | Tagged , , | 1 Comment

Multiple virtual hosts using SSL on the same IP and Port

Tonight I decided to set up SSL on two internal web apps I’ve been running for a while. I have a wildcard certificate *.stockpr.com just for this purpose. Each app was originally running on a separate hostname on a single … Continue reading

Posted in sysadmin | Tagged , | 2 Comments

Amazon EC2 and “4gb seg fixup”

Tonight I spent two hours banging on an EC2 instance that suddenly went awry. I was adding SSL to a couple of internal applications we host on this instance when my “apache2ctl configtest” command hung. I tried all sorts of … Continue reading

Posted in sysadmin | Tagged , | 4 Comments

Bundling EC2 Instances and EBS

As I mentioned in the last post, I’m working on hosting email accounts on Amazon EC2. I am experimenting with mounting /var on an EBS volume so my database, logs, etc. will survive the failure of an instance.  The idea is … Continue reading

Posted in sysadmin | Tagged , , , | Leave a comment