Apache2Triad Help, Support and Development Forum Index Apache2Triad Help, Support and Development
The apache2triad help , support and development forums
 

restart??
Click here to go to the original topic

 
       Apache2Triad Help, Support and Development Forum Index -> Ftp
View previous topic :: View next topic  
Author Message
DennyLoko



Joined: 26 Mar 2006
Posts: 3

Posted: Thu Apr 13, 2006 4:48 pm    Post subject: restart??  

Well, I tried to make one script that restart SlimFTPd, but it never is restarted...

Can someone help-me in this script?

I use windows XP, and I tried this things:

$ftprest = "net stop SlimFTPd & net start SlimFTPd";
$ftprest = "net stop SlimFTPd && net start SlimFTPd";
$ftprest = "net stop SlimFTPd" & "net start SlimFTPd";
$ftprest = "net stop SlimFTPd" && "net start SlimFTPd";
$ftprest = $ftpstop & $ftpstart;
...

well, I tried a lot of a things, and nothing work... how can I make um script to restart SlimFTPd by A2TCP without stop and start the SlimFTPd? I was thinking one script which make it automatically...

Thnx,
DennyLoko.
Back to top  
Vlad Alexa Mancini



Joined: 07 Jul 2003
Posts: 1538

Posted: Fri Apr 14, 2006 5:49 am    Post subject:  

obviously you can not stop a service and start it in the same second fraction

remove your changes and use something like :

Code: system($ftpstop);
sleep(10);
system($ftpstart);

for example , to wait 10 seconds for the service to stop
Back to top  
DennyLoko



Joined: 26 Mar 2006
Posts: 3

Posted: Sun Apr 16, 2006 10:13 pm    Post subject:  

sorry, I'm not good on scripting...
I've tried this commands, because I tested it into cmd, and works fine...

well, later a I'll made the changes...

thnx...
Back to top  
jjohall2000



Joined: 08 Jun 2006
Posts: 11

Posted: Mon Jun 12, 2006 9:06 pm    Post subject:  

Vlad Alexa Mancini wrote: obviously you can not stop a service and start it in the same second fraction

remove your changes and use something like :

Code: system($ftpstop);
sleep(10);
system($ftpstart);

for example , to wait 10 seconds for the service to stop

Hi,

This looks like a nice bit of code, but can someone give me an example where i can use the code to make it restart when i update and create a new user?

Many Thanx
jjohall2000
Back to top  
 
       Apache2Triad Help, Support and Development Forum Index -> Ftp
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.13 © 2001, 2002 phpBB Group