<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>16293</bug_id>
          
          <creation_ts>2003-02-24 13:52 0000</creation_ts>
          <short_desc>wwwoffle-online should read config-file</short_desc>
          <delta_ts>2003-03-22 15:07:54 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Server</component>
          <version>1.4_rc2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>csimonut@gmail.com</reporter>
          <assigned_to>danarmak@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>csimonut@gmail.com</who>
            <bug_when>2003-02-24 13:52:03 0000</bug_when>
            <thetext>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 &quot;Starting wwwoffled-online&quot;
-    wwwoffle -online
+    wwwoffle -online -c /etc/wwwoffle.conf
    eend $?
}

stop() {
    ebegin &quot;Stopping wwwoffled-online&quot;
-    wwwoffle -offline
+    wwwoffle -offline -c /etc/wwwoffle.conf
    eend $?
}</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>danarmak@gentoo.org</who>
            <bug_when>2003-03-11 10:10:06 0000</bug_when>
            <thetext>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? </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>volkris@gmail.com</who>
            <bug_when>2003-03-21 02:13:18 0000</bug_when>
            <thetext>He&apos;s exactly correct.

The wwwoffle program accessed by the online script isn&apos;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).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>csimonut@gmail.com</who>
            <bug_when>2003-03-21 09:36:33 0000</bug_when>
            <thetext>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 &lt;host&gt;[:&lt;port&gt;]
 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>danarmak@gentoo.org</who>
            <bug_when>2003-03-22 15:07:54 0000</bug_when>
            <thetext>Ah, now I understand. I confused wwwoffle parameters -c (use this config file) and -config (tell 
wwwoffled to use this config file). I&apos;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&apos;ll pass ;-) </thetext>
          </long_desc>
      
    </bug>

</bugzilla>