Posts Tagged ‘Linux’

Bash Linky Goodness

Monday, June 25th, 2007

I have been in the process of learning to write bash scripts and also make the as efficient as possible.  I never really had the need to learn any scripting until recently so I dove in.  I thought  I would compile a nice list of some sites that have information on Bash scripting, that way if anyone else is interested they can have an easy start on getting into it.

Bash Cures Cancer - Learn the UNIX/Linux command line.
Grover Ponders - Here is some information about creating a menu system for your scripts.
Here is a nice Crash course on getting used to bash in general.
Bash Reference Manual - This has it all.
And this has the rest. (Advanced Bash-Scripting Guide)
Sample scripts can be found here, and here.

Hope some of those links come in handy.  If you have any other helpful bash scripting links please leave a comment.

MythTV Linky Goodness

Friday, June 8th, 2007

I was looking over some of my server logs and noticed a few incoming links from MythTV.  After looking into it, seems as though the good people over there liked a few of my posts about MythTV IMDB Fetch issues and the fix to go with them.  Just thought it was interesting…

Start synergy with GDM on Ubuntu

Friday, May 18th, 2007

I was looking for a way to auto start Synergy when my Ubuntu boxes started up.  I came across this article over EightPence.  It works perfectly.

Enable SLM on Virtuozzo 3.0

Thursday, May 10th, 2007

After doing some research on SLM it looks like it is the way to go if you are running Virtuozzo 3.0. What is SLM, “Virtuozzo Service Level Management (SLM) is a system that maintains and allows administrators to configure and control the levels of service (i.e., the set of ‘promises’) provided to VPS owners.
I came across some different ways of enabling SLM on the VP Node, by far the best was the information about how to enable it with out a Node reboot. If you are running a current version of Virtuozzo you can do this with pretty much a simple modprobe. Just connect to the VP Node of your chose and run the following commands. These are the steps I tood to enabled SLM on my 512mb Virtual Dedicated server.

modprobe slm_core

Edit the following files and make said changes

/etc/sysconfig/vz and change the SLM entry to slm=yes
/etc/sysconfig/vzagent/vzagent.conf Locate the SLM entry, change it to 1.

Now you need to enable SLM on your Virtual Dedicated server. Since mine was a 512mb server I enabled it as shown to give it dedicated 512mb, with a burstable 1024mb.

vzctl set 408 –slmmode all –slmmemorylimit 512M:1024M –save

To check your settings you can login to your vps and use the free command.

free -m

If everthing went as planned you should now have an SLM enabled Virtual Dedicated server.

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

rsync is the best pt. 2

Friday, April 6th, 2007

A while back I made a post about Rsync, well I decided to revisit that post and add a little bit of an update. I now use it like so when backing up my music. It compresses the files and also has a progress bar.

rsync –progress -azruvpe ssh * shelby@192.168.1.2:/mnt/share1/music/

So far it works fine and looks better.