[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Scripting Errors



Hello All,

I have a problem trying to run a scrip in RH 9.0 it is running fine in RH 8.0
but I get TTY permission errors in the logs. I used 'chkconfig -add folding' to
add the service to the right startup level (well the ones I wanted it in
anyway). I figure that the script will be useful to look at, so it is below.
Please any suggestions will be greatly appreciated.

#!/bin/sh
#chkconfig: 345 99 99
#description:  Start | Stop | Restart | (Check the) Status of the FAH Linux
console client
source /etc/rc.d/init.d/functions
FAH="/home/mcdougrs/folding/FAH3Console-LinuxB.exe"
cd /home/mcdougrs/folding/ >/dev/tty6
RETVAL=1
case "$1" in
        start)
                echo -n "Starting Folding Home client ... "
                su mcdougrs -c "$FAH >/dev/tty6 &"
                RETVAL=$?
                ;;
        stop)
                echo -n "Stopping Folding Home's FAH3Console-Linux.exe ... "
                killproc FAH3Console-Linux.exe
		RETVAL=$?
                ;;
        restart)
                $0 stop
                /usr/bin/sleep 1
                $0 start
		RETVAL=$?
                ;;
        status)
		status FAH3Console-Linux.exe
		RETVAL=$?
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
                ;;
esac
exit $RETVAL


Thanx,
Ryan

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]