Hi there,
I tried to use an supervise in daemontoos
(ftp://koobera.math.uic.edu/www/software.html) to monitor the sshd daemon
so that it will start the daemon if it dies. But it keeped starting it and
I get the following messages continuesly until I kill it:
Starting sshd...FATAL: Creating listener failed: port 22 probably already
in use!
.....
Here is my script:
PROG=sshd
LKDIR=/var/lock/sshd
mkdirs() {
[ -d $LKDIR ] || ( mkdir -p $LKDIR );
}
start () {
mkdirs
echo -n "Starting $PROG..."
supervise $LKDIR /usr/local/sbin/$PROG
echo "done"
}
Anyone saw this problem before? Thanks for any hints.
--George Hong
System Admin
Dakotacom.net