#!/bin/bash if [ ! -e /var/run/screen/S-$(whoami)/*irc ] then # screen isn't running echo >> ~/cronlog "Trying to start screen irssi on $(hostname)" rm -f /u3/w/worc1588/scratch ln -sf /tmp/u3/w/worc1588 /u3/w/worc1588/scratch mkdir /u3/w/worc1588/scratch/irclogs if [[ "$(hostname)" != crow ]]; then echo >> ~/cronlog "This is $(hostname). :( Why the hell is this being ran?" exit fi screen 2>/dev/null -U -d -m -S irc ~/bin/irssi || echo >> ~/cronlog "failed" echo >> ~/cronlog " screen is running on $(cd /var/run/screen/S-$(whoami)/; echo *irc) Current date is $(date) Current uptime is $(uptime 2>/dev/null)" fi