PDA

View Full Version : Restart sitebot if not running


ddeca
11-11-2003, 09:14 AM
The only way i can make sitewho.exe to work on the bot is if i start the bot trough ioFTPD with site command

So what i need is a little script that runs in scheduler and checks if windrop is running (ioUptime already does that) and if it not site exec command

If i put all my effort in it i might be able to figure out a solution myself, but since we got so good progammers here i think they will do it in 5 min or so :D

TIA ddeca

Mouton
11-11-2003, 10:51 AM
No programming involved, unless u call creating a .bat file programming...

OnFtpLogin = ..\windrop\restart.bat

restart.bat:
cd c:\ioftpd\windrop
pslist eggdrop.exe > nul
if errorlevel 1 goto restart
goto end

:restart
hiderun eggdrop.exe -nt eggdrop.conf

:end

ddeca
11-11-2003, 09:29 PM
THX Mouton..

Nice tip... Made the bat like this

The ECHO is just there to tell me what's get executed


@echo off
CD c:\windrop
pslist eggdrop > nul
IF ERRORLEVEL 1 GOTO con
ECHO BOT STILL RUNNING (DiD NOTHiNG)
GOTO END

:CON
CD c:\windrop
start hidewndw /r /n 'c:\windrop\eggdrop.exe -nt eggdrop.conf'
ECHO BOT DOWN (RESTARTiNG iT)

:END


The .BAT file works perfekt as
site command ("SITE BOT")
and in
dos (c:\ioftpd\scripts\bot.bat)
and as
OnFtpLogIn = EXEC ..\scripts\bot.bat

but not in Schedular... really pisses me of any one have an ide ??
tryed this 3 options...and no1 starts the damn script
(and I did restart ioFTPD and the whole box NOT only rehased it)

Check1_Bot = 0,20,40 * * * EXEC bot
Check2_Bot = 0,20,40 * * * EXEC bot.bat
Check3_Bot = 0,20,40 * * * EXEC ..\scripts\bot.bat

[scripts]
bot = EXEC ..\scripts\bot.bat


Is there away of debug the SCHEDUALR ??
To se what is exec or in this case not excute

TIA ddeca

wooolF[RM]
11-11-2003, 10:12 PM
I would use it as :

CheckBotStatus = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\bot.bat

rest... rest should be working...

u can try to replace bot.bat with this one:echo TEST
pause
exit 0then you should be able to see new DOS window popup every 5 mins with text "TEST" and prompting u to press any key (to exit)... if u get this to work, then sheduler works just fine.

also it's a good idea to rehash your config (and I would also recommend to restart ftpd (just to be 100% sure))

neoxed
11-11-2003, 10:25 PM
Originally posted by wooolF[RM]
also it's a good idea to rehash your config (and I would also recommend to restart ftpd (just to be 100% sure))
Changes to the scheduler require you to restart NOT rehash for changes to take effect.

schmacko
11-12-2003, 04:18 AM
Originally posted by ddeca
...and no1 starts the damn script
(and I did restart ioFTPD and the whole box NOT only rehased it)


:P

ddeca
11-12-2003, 06:54 AM
I guess the Schedular is ****ed up...:mad: :mad:

Does'nt execute any .bat or .cmd file...
so now i need a TCL script that starts my bat file or something...

Anyone ???

//ddeca

wooolF[RM]
11-12-2003, 07:54 AM
since we know that sheduler works fine with EXE files, u can convert your bat to exe file (look for it at google.com), it's easy as 1-2-3 and takes no time :)
Also exe files arre kinda faster then BATs :)

G'luck

ddeca
11-12-2003, 09:47 AM
thx for trying...

But that didnt do the trick either.. I GIVE UP :mad:

I will have it in "onFtpLogin" instead even tho it is a crappy sulotion


//ddeca

wooolF[RM]
11-12-2003, 11:20 AM
if u use ioBanana u can use on_release_complete=bot.bat :)

ddeca
11-12-2003, 01:47 PM
Okey i fixed it :)

So easy and strange...

I made a BAT file that starts the other bat file

Dunno why it cant execute the bat directly but now it works :D


Thx for your efforts

//ddeca

schmacko
11-12-2003, 10:26 PM
Originally posted by ddeca
The .BAT file works perfekt as
site command ("SITE BOT")
and in
dos (c:\ioftpd\scripts\bot.bat)
and as
OnFtpLogIn = EXEC ..\scripts\bot.bat


workin here in dos..
not workin the other ways for some reason :/

freak007
12-29-2003, 04:55 AM
i have the same problem as schmacko. The complete bat only works when i execute the file in dos mode. But when i try to execute it over ioftpd with Scheduler or OnFtpLogin or site command it does not work correctly. The bat will be executed but only echo commands.

The line to start the eggdrop will not be executed, could someone tell me why ? Please i need help.

This is my bat file:

@echo off
cd c:\ioftpd\sitebot
pslist eggdrop > nul
if errorlevel 1 goto restart
goto end

:restart
cd c:\ioftpd\sitebot
echo Sitebot wird gestartet !!!
hiderun eggdrop -nt eggdrop.conf

:end


Thx for all your help

freak007

Mouton
12-29-2003, 10:14 AM
What's the site command or Scheduler line u used ?
That'S probably wrong.

freak007
12-29-2003, 11:23 AM
bot = EXEC ..\sitebot\restart.bat

FTPServerTools
01-01-2004, 04:17 AM
Try using TaskIsRunning (somewhere else on the forum) instead of pslist . Maybe that helps.

bounty
03-17-2004, 07:59 PM
ok m8s i had the same probs ... never worked in ioftpd scheduler
so i tried the task scheduler from windows .... grrr that one is really ugly ;)

so i searched for a cron program for windows and i found this:
http://www.splinterware.com/download/wincron.zip
this is a free version

and now all is working perfect ;)


have fun
bounty

PS: i use a .bat file & TaskIsRunning from RAMRAM

svengoran
07-21-2006, 08:55 PM
No programming involved, unless u call creating a .bat file programming...

OnFtpLogin = ..\windrop\restart.bat

restart.bat:
cd c:\ioftpd\windrop
pslist eggdrop.exe > nul
if errorlevel 1 goto restart
goto end

:restart
hiderun eggdrop.exe -nt eggdrop.conf

:end

about the bat file
the "cd c:\ioftpd\windrop" should be the folder where eggdrop.exe is right?

and the only text in it should be
cd c:\ioftpd\windrop
pslist eggdrop.exe > nul
if errorlevel 1 goto restart
goto end

:restart
hiderun eggdrop.exe -nt eggdrop.conf

:end

errorlevel 1 means its not running?

OnFtpLogin = ..\windrop\restart.bat where do i put this? under what part in ioftpd.ini?

svengoran
07-24-2006, 05:17 PM
anyone who can help?