All pastes #473902 Raw Edit

Pete-J

public shellscript v1 · immutable
·published 2007-05-06 14:07 UTC
rendered paste body
#!/bin/bashSTATUS="0"while [ $STATUS == "0" ]doDARKPID=`pidof darkice`function pidactive () {    #sends a signal which checks if the process is active (doesn't kill anything)    kill -0 $1 2> /dev/null    return}if pidactive $DARKPID; then    STATUS="1"    else    STATUS="2"fidoneif [ $STATUS == "2" ]; then/usr/bin/aplay "$@"fi