Posts Tagged ‘script’

Random link posting

Thursday, December 6th, 2007

I really had nothing to write about so I thought I would post a few links that I came across.  Sean pointed out this article about how working night shift is a cause for cancer, then again that is no surprise since everything leads to cancer these days.  I forwarded it off to my boss, he responded with “Hilarious this coming from a smoker”.   I have been using a mac for the past couple of years and with the release of Automator one might have taken note… but I didn’t until now.  I came across this script that seems pretty nice and it working just fine, I suggest installing it on your system if you use Mail.app.

Simple Bash Backup v.01

Saturday, August 11th, 2007

I needed a simple backup script to rsync some files from one folder to a mounted backup drive. After poking around on the net I found a few different scripts that I hacked together to make this script. I plan on updating it to send either Growl notices to my powerbook or send some popups to my Gnome desktop. Anyways here is the script keep checking back for updates.

#!/bin/bash
# Location of the backup mount
BACKUPHD=‘/bkmnt2′
# Directory to Backup
BACKUPHD1=‘/home/user/’

backup() {
echo -e "Using Rsync to copy file to $BACKUPHD\n"
rsync -azrup $BACKUPHD1 $BACKUPHD
}

if grep $BACKUPHD /etc/mtab
then
backup
exit 0
else
echo "Backup Drive was is not mounted. Attempting to mount… "
if mount $BACKUPHD
then
echo -e "Success!\n"
backup
exit 0
else
echo -e "Failed!\n"
exit 1
fi
fi
exit 0

SSH automatic login assistance script

Thursday, May 10th, 2007

A while ago I did a write up on SSH keys, anyways I was looking into it a little more today and came across this handy little script that makes it… well simple.  I didn’t write it myself, I found it over here.  Go ahead and give it a try it works like a charm.

#!/bin/bash
# say: ./pussh.sh hostname
# Uploads your id_rsa.pub to the specified host, wrapped for readability
if [ ! -r ${HOME}/.ssh/id_rsa.pub ]; then
ssh-keygen -b 2048 -t rsa
fi
# Append to the copy on the remote server
cat ~/.ssh/id_rsa.pub | ssh ${USER}@$1 “cat - >> .ssh/authorized_keys”

if [ $? -eq 0 ]; then
echo “Success”
fi

MythTV 0.20-0.2ubuntu2 IMDB Fetch Problems

Tuesday, April 3rd, 2007

The newest MythTV install on Ubuntu 6.10 has issues when trying to fetch movie information with the included IMDB Script. The fix is pretty simple, Click more to view the steps.
(more…)