>
> ..., because there is always something missing from the log on the
> server, if it is done by a package.
>
> It is best to do it after WPKG.js is called, which can be accomplished
> by a post action in WPKG client or a line in the batch file executing
> WPKG.js
I've done this inside of WPKG - the trick is to spawn the package process
(on execute='changed' in my case), let wpkg continue and the spawned
process waits for wpkg to end and only then touches the log
this combination will ftp the log to the server only if an error is
logged:
<package id='reporterror'
name='Report Packaging Errors'
revision='4'
priority='0'
execute='changed'>
<install cmd='"%TOOLDIR%\curl.exe" -f -s
http://wpkg/wpkg/scripts/reporterrors.cmd -o
"%TOOLDIR%\reporterrors.cmd"'>
<condition>
<check type='logical' condition='not'>
<check type='file' condition='sizeequals'
path='%TOOLDIR%\reporterrors.cmd' value='324' />
</check>
</condition>
</install>
<install cmd='"%COMSPEC%" /C start "reporterrors" "%COMSPEC%" /C
"%TOOLDIR%\reporterrors.cmd"'/>
<upgrade include='install'/>
</package>
with reporterrors.cmd being this:
---
goto test
:wait
ping localhost
:test
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WPKG /v running | find "true"
if %ERRORLEVEL% EQU 0 goto wait
FIND "ERROR" "%TEMP%\wpkg-%COMPUTERNAME%.log"
if %ERRORLEVEL% NEQ 0 goto end
"%~dp0\curl.exe" -f -s ftp://wpkg/wpkg-log/ -T
"%TEMP%\wpkg-%COMPUTERNAME%.log"
:end
---
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/wpkg-users