> Sorry, hit send accidentally. It seems like assp is designed so that > only a start command makes sense in AutoRestartCmd, but perhaps > there's a point to including kill and pid-removal stages as well?
imHo yes; I mean, a restart script should take care of stopping assp, waiting for it to completely stop (for a reasonable amount of time) go on killing the process (if still alive), delete the "pid" file and then go on starting ASSP again; I did that on windows using some "tools" and it should be even easier on unix/linux; in my case the win32 restart script looks this way (notice that you'll need some 3rd party tools to use it, also notice that the "restart.run" file is used as a flag to avoid multiple overlapping instances of the script in case it is used from the SCM or the like) ### script start @echo off : :INIT rem --- initialize the script cls pushd c:\assp if exist restart.run goto BAIL echo %DATE% %TIME% >restart.run set LOG=restart.log : :VRFY rem --- check if the service is running sc query asspsmtp|find "STOPPED" >NUL 2>&1 if errorlevel 1 goto STOP goto START : :STOP rem --- stop the running service echo %DATE% %TIME% Stopping ASSP service... >>%LOG% sc stop asspsmtp >NUL 2>&1 echo %DATE% %TIME% Waiting for the service to stop... >>%LOG% sleep 120 sc query asspsmtp|find "STOPPED" >NUL 2>&1 if errorlevel 1 goto KILL echo %DATE% %TIME% Service stopped. >>%LOG% goto START : :KILL rem --- if stop failed, kill the process echo %DATE% %TIME% Killing process... >>%LOG% pskill /accepteula -t perl >>%LOG% 2>&1 : :START rem --- start the service sleep 3 echo %DATE% %TIME% Starting ASSP service... >>%LOG% if exist pid del pid sc start asspsmtp >NUL 2>&1 : :QUIT rem --- restart complete echo %DATE% %TIME% ====================================== >>%LOG% set LOG= if exist restart.run del restart.run : :BAIL rem --- end of script popd exit ### script end ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Assp-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/assp-user
