Please add following lines to /etc/init.d/wwwoffle-online, otherwise wwwoffle will not read its configuration file. If you change the default port in /etc/wwwoffle.conf the script fails to put wwwoffle in online/offline mode. Another solution is to export the env-variable WWWOFFLE_PROXY (see manpage for wwwoffle). start() { ebegin "Starting wwwoffled-online" - wwwoffle -online + wwwoffle -online -c /etc/wwwoffle.conf eend $? } stop() { ebegin "Stopping wwwoffled-online" - wwwoffle -offline + wwwoffle -offline -c /etc/wwwoffle.conf eend $? }
Do you mean the wwwoffled control port (default 8081) or the http proxy port (default 8080)? I tried changing each in /etc/wwwoffle.conf and the current wwwoffle-online initscript continued working. What exactly was your problem, how did it fail? Why would it need to reread ist config file to go into offilne/online mode?
He's exactly correct. The wwwoffle program accessed by the online script isn't the same as the wwwoffled server. wwwoffle communicates with the running server through the control socket. Therefore it has to know where that socket is, and it can get this information from the config file. If you start wwwoffled with the control socket on a different port and then try to use wwwoffle it will hang for a while before exiting with an error (though the init script will report success).
Hi, it is exactly as Carlin described. wwwoffle cannot switch to online or offline mode if you change the default control port. From the wwwoffle man-page: -p <host>[:<port>] Sets the hostname and port number that is to be ued for the con- nection to the proxy server. For the -online, -offline, -fetch, -config and -purge option this must be the WWWOFFLE daemon port, for the url options it must be the http proxy server port. If no -p option is specified then the compiled in defaults are used. Simon
Ah, now I understand. I confused wwwoffle parameters -c (use this config file) and -config (tell wwwoffled to use this config file). I've added the fix to the wwwoffle-online script as described in the orig submission. Although, I suppose a yet more generic way would be to make a conf.d file that would specify the location of the config file, in case someone wanted to use something other than /etc/wwwoffle.conf... But until someone actually asks me to do that I'll pass ;-)