microdc-devel
[Top][All Lists]
Advanced

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

[microdc-devel] MICRODC PROBLEM


From: Maxon2oo
Subject: [microdc-devel] MICRODC PROBLEM
Date: Fri, 17 Mar 2006 00:04:54 +0300

Hello,

I'm using Microdc and I have a little problem with it. My microdc
client is connected to a hub based on VerliHub and I've noticed that
it is disconnected once a day (24h). There were no bots or scripts on
Verlihub so I was sure that it wasn't Verlihub's fault.

I'm running 24h file server, so I need Microdc be ALWAYS online.
Microdc can't automatically reconnect to a hub (I guess), so I wrote a
simple sh script that is runned by vixie-cron every minute. It checks
if microdc is online (I also wrote lua script that does a record to
mysql on connection to a hub and deletes a record on disconnection.
So when it is online there is a record in mysql table. ). If microdc
is not online this script kills microdc and restarts microdc's init
script (reconnect to a hub).

-------------------------------------------------------------------
#!/bin/sh
NICK="FiLE-Server"
echo -e "select * from onlineusers where nick='$NICK';\n\
quit" | mysql -u user -pmypassw0rd myBD |\
grep "nick" >/dev/null
if [ "$?" = "1" ]; then
        ps -A |grep microdc >/dev/null
        if [ "$?" = "0" ]; then
            /etc/init.d/microdc stop >/dev/null 2>&1
            sleep 3
            killall -KILL microdc >/dev/null 2>&1
        fi
        /etc/init.d/microdc zap >/dev/null 2>&1
        /etc/init.d/microdc start >/dev/null
fi
-------------------------------------------------------------------

So I found a problem. If this script is runned manually, microdc
reconnects to a hub succesfully and works good. BUT If it is runned
by vixie-cron (every minute) it can't connect a hub, but make an
attemp to do this (I saw cron logs).

The last lines from Microdc screen are:
..
Sending password to hub.
Nick accepted. You aro now logged in.
microdc>

And no result at all!
It is connected to a hub, but momently disconnected, so it can't
receive even the MOTD!

My Windows DC++ log is:

[23:51:27] *** Connected: FiLE-Serve
[23:51:27] *** Disconnected: FiLE-Serve

The script is chmodded 777, owner is root, group is root. It is runned
by vixie-cron as root user. My os is Gentoo 2005.1

What may be the problem?

If it is runned manually, microdc is connected and runs fine, but if it
runned by cron, microdc is disconnected from a hub just after connect.

I tryed to connect to different hubs. The same result. :(

Help me please!

-- 
Best regards,
 Maxon2oo                          mailto:address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]