How To Mess With Crappy Customers – Phone Kill Switch

When I worked for this huge corporation at the desktop publisher desk, we used to have this guy who would come in, layout his lunch and use our courtesy phone to conduct business from.

Needless to say, this wasn’t right.

We kept asking him to leave, and he just kept coming back.

Eventually I got tired of it, and decided to do something about it.

Enter, the phone kill switch.

All I did was put a simple toggle switch inline with the phone line going to the courtesy phone.  Cut one of the wires for the phone line, put the switch in between it, then wire it all back up. Very simple, yet hours of fun.

Here’s a close up view of the switch.

Here it is all attached up to the wall.

So when he’d make a call I’d reach down, scratch my leg, and OOPS press the button. And he’d get disconnected.

I swear by the end of it he thought the phone was possessed and never came back!

Try it yourself!

Ices & Icecast Howto for OpenBSD

HOWTO: Ices & Icecast/OpenBSD


  • Icecast
  • Ices
  • MP3’s/OGG’s
  • Unixish Operating System, In this case OpenBSD

Although this howto is written for OpenBSD I’m sure it will work on any other BSD or Linux Operating System with a few modifications given to the instructions below.

Please keep in mind that these instructions are by no means complete, or even guaranteed to work. I’m writing this from memory, so I might mistake some steps, but there is excellent documentation available through the use of Google or the Icecast/Ices site.

What I did:


Compile and install icecast and ices, I’m not going to explain the instructions for that here as there is abundant documentation available for that already on the web.

In my case, I did not use the OpenBSD ports, instead I opted to use the source (most current) directly from the website.


I installed a seperate HDD for music to be stored on, but you don’t have to go that far.

You can also do the following:

As ‘root’ create a directory where you would store mp3 files that are to be served:

# mkdir -p /opt/music


I shared the music directory with Samba and copied a bunch of mp3’s to it in nicely organized sub directories directories. I’m not going to go into detail about the samba setup, as you should be able to find abundant documentation about it on the website, or on google.

My Samba configuration is very insecure, but it serves my needs well, as anyone on the network can copy files to and from it, and can make their own directories. I also have only one other person on my network who is trusted and able to access this share. You may setup samba as insecure or securely as you wish.



comment = Radio Station Music

path = /music/all

read only = no

public = yes

guest ok = yes

[ Directory Listing ]

(/music/all)#ls -lt

total 440

drwxrwxrwx 3 iceuser iceuser 3584 May 6 19:35 punk

drwxrwxrwx 16 iceuser iceuser 3072 Feb 22 12:35 electronica

drwxrwxrwx 16 iceuser iceuser 1024 Feb 16 21:44 techno

drwxrwxrwx 13 iceuser iceuser 1024 Feb 16 17:22 chill

drwxrwxrwx 7 iceuser iceuser 2048 Feb 16 16:31 hiphop

drwxrwxrwx 5 iceuser iceuser 4608 Feb 15 20:57 rock

drwxrwxrwx 10 iceuser iceuser 1536 Feb 15 18:57 jungle


I created a script in /usr/local/bin to scan my mp3’s, and generate a playlist of each directory as well as all of the mp3’s into one big list. This script is by no means complete, or even good, but it works. If you modify this script please feel free to let me know so I can post any modifications on this page.

(/usr/local/bin)# touch

(/usr/local/bin)# chmod +x

(/usr/local/bin)# vi (or pico or ed, or whatever editor you like)

and this is what i entered in the script: (change pathnames as appropriate)


if [ -d /music/all ]; then


echo “looks like we have some mp3 directories to look at..”

echo “will proceed with playlist file creation”

echo -n “please be patient…”

sudo -u iceuser find /music/all/ -name *.mp3 -print > /music/all/all.txt

echo -n “.”

sudo -u iceuser find /music/all/jungle/ -name *.mp3 -print > /music/all/jungle.txt

echo -n “.”

sudo -u iceuser find /music/all/techno/ -name *.mp3 -print > /music/all/techno.txt

echo -n “.”

sudo -u iceuser find /music/all/chill/ -name *.mp3 -print > /music/all/chill.txt

echo -n “.”

sudo -u iceuser find /music/all/electronica/ -name *.mp3 -print > /music/all/electronica.txt

echo -n “.”

sudo -u iceuser find /music/all/hiphop/ -name *.mp3 -print > /music/all/hiphop.txt

echo -n “.”

sudo -u iceuser find /music/all/punk/ -name *.mp3 -print > /music/all/punk.txt

echo -n “.”

sudo -u iceuser find /music/all/rock/ -name *.mp3 -print > /music/all/rock.txt

echo -n “.”

echo -n “done”




echo “”

echo “the mp3 files don’t exist”

echo “”



if [ -f /music/ice/log/ ]; then

echo “”

echo “icecast process already running”

echo “assuming you wish to terminate..”

echo “killing process”

#insert kill process thing here

echo “deleting pid file (if any)”

rm -f /music/ice/log/

echo -n “Starting icecast..”

sudo -u iceuser -b /usr/local/bin/icecast -c /usr/local/etc/icecast.xml >/dev/null 2>&1

echo -n “Running!”

echo “”


echo “”

echo -n “Starting icecast..”

sudo -u iceuser -b /usr/local/bin/icecast -c /usr/local/etc/icecast.xml >/dev/null 2>&1

echo -n “running!”

echo “”


if [ -x /usr/local/bin/ices ]; then

echo “Starting ices now”

echo -n “source:”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/jungle.conf >/dev/null 2>&1

echo -n “, jungle”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/chill.conf >/dev/null 2>&1

echo -n “, chill”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/rock.conf >/dev/null 2>&1

echo -n “, rock”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/hiphop.conf >/dev/null 2>&1

echo -n “, hiphop”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/punk.conf >/dev/null 2>&1

echo -n “, punk”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/techno.conf >/dev/null 2>&1

echo -n “, techno”

sudo -u iceuser /usr/local/bin/ices -c /usr/local/etc/electronica.conf >/dev/null 2>&1

echo -n “, electronica”

echo “”

echo “”


echo “”

echo “main program file ices is missing”

echo “check your path to make sure”

echo “ices is resident somewhere!”

echo “”



I setup my /etc/rc.local file to run my script once upon boot of the box. On other operating systems this might be in /etc/rc.d/ or /usr/local/etc/.

echo “# for icecast /usr/local/bin/” >> /etc/rc.local

Be sure to use >> and not >. As >> is append, and > is overwrite.


Edit your icecast.xml and ices.conf files.

[ icecast.xml ]






























<loglevel>1</loglevel> <!– 4 Debug, 3 Info, 2 Warn, 1 Error –>






















































[ Edit ices.conf (or in this case the rock music stream)]

<?xml version=”1.0″?>

<ices:Configuration xmlns:ices=””>




















<Name>Spizzo Rock Radio!</Name>

<Genre>Rock / Alternative</Genre>

<Description>Rock and Alternative – sixties to today</Description>










Reboot and test it out.

[ Output on Login ]

looks like we have some mp3 directories to look at..

will proceed with playlist file creation

please be patient……….done

deleting pid file (if any)

Starting icecast..Running!

Starting ices now

source:, jungle, chill, rock, hiphop, punk, techno, electronica

You should see something like the previous when you login. If there is any errors, make sure you have the correct paths in your icecast config files and in your script.

[Web Test]

You should now be able to access the icecast website. Make sure you check the paths, and set up the web site according to the icecast documentation before attempting this. It’s really quite easy to setup though.