Running bsdstats through a proxy

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Running bsdstats through a proxy

Olivier Nicole-2
Hi,

I would like to enable bsdstats to run, but I need to configure a proxy.

I see it rely on the environment variable HTTP_PROXY, but where should I
define it so that it is used by the monthly periodic script and by
bsdstats launched at boot?

TIA,

Olivier
--
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Matthew Seaman-5
On 15/11/2017 05:19, Olivier wrote:

> Hi,
>
> I would like to enable bsdstats to run, but I need to configure a proxy.
>
> I see it rely on the environment variable HTTP_PROXY, but where should I
> define it so that it is used by the monthly periodic script and by
> bsdstats launched at boot?
>
> TIA,
>
> Olivier
>
/etc/login.conf should work for you.  You can add whatever environment
settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.

Remember to run 'cap_mkdb /etc/login.conf' after editing the file.

        Cheers,

        Matthew


signature.asc (1011 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Olivier Nicole-2
Matthew Seaman <[hidden email]> writes:

> /etc/login.conf should work for you.  You can add whatever environment
> settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.
>
> Remember to run 'cap_mkdb /etc/login.conf' after editing the file.

Thank you.

Olivier
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Marc Fournier-4
In reply to this post by Matthew Seaman-5

You should be able to just add them to /etc/periodic.conf … bsdstats on FreeBSD will read its environment variables from there …



> On Nov 14, 2017, at 23:45, Matthew Seaman <[hidden email]> wrote:
>
> On 15/11/2017 05:19, Olivier wrote:
>> Hi,
>>
>> I would like to enable bsdstats to run, but I need to configure a proxy.
>>
>> I see it rely on the environment variable HTTP_PROXY, but where should I
>> define it so that it is used by the monthly periodic script and by
>> bsdstats launched at boot?
>>
>> TIA,
>>
>> Olivier
>>
>
> /etc/login.conf should work for you.  You can add whatever environment
> settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.
>
> Remember to run 'cap_mkdb /etc/login.conf' after editing the file.
>
> Cheers,
>
> Matthew
>

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Olivier Nicole-3
Marc,

On a new machine (FreeBSD 11.1-RELEASE-p6) with bsdstats-6.0_2, I see:

The machine contacts the proxy with: HEAD.http://rpt.bsdstats.org/.
Reply: HTTP/1.0.302Moved.Temporarily

Then the machine contacts the proxy with: GET.http://rpt.bsdstats.org/sc
Reply: HTTP/1.0.500.Internal.Server

Best regards,

Olivier

On Fri, Jan 5, 2018 at 8:24 AM, Marc G Fournier <[hidden email]> wrote:

>
> You should be able to just add them to /etc/periodic.conf … bsdstats on FreeBSD will read its environment variables from there …
>
>
>
>> On Nov 14, 2017, at 23:45, Matthew Seaman <[hidden email]> wrote:
>>
>> On 15/11/2017 05:19, Olivier wrote:
>>> Hi,
>>>
>>> I would like to enable bsdstats to run, but I need to configure a proxy.
>>>
>>> I see it rely on the environment variable HTTP_PROXY, but where should I
>>> define it so that it is used by the monthly periodic script and by
>>> bsdstats launched at boot?
>>>
>>> TIA,
>>>
>>> Olivier
>>>
>>
>> /etc/login.conf should work for you.  You can add whatever environment
>> settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.
>>
>> Remember to run 'cap_mkdb /etc/login.conf' after editing the file.
>>
>>       Cheers,
>>
>>       Matthew
>>
>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Marc Fournier-4

Hrmmm … I didn’t write the PROXY code, so if anyone is familiar with proxies, please feel free to step up … but could you modify the code ( /usr/local/etc/periodic/monthly/300.statistics ) and change the first line to state:

#!/bin/sh -x

( note, just adding the x to the end of hte line )

then send me the output ( privately, not to the list ) of:

/usr/local/etc/periodic/monthly/300.statistics -nodelay

that should let me see how its re-writing things … for starters, the truncation at ‘/sc’ is odd, since it should be something like:

/scripts/enable_token.php…



> On Jan 4, 2018, at 19:50, Olivier Nicole <[hidden email]> wrote:
>
> Marc,
>
> On a new machine (FreeBSD 11.1-RELEASE-p6) with bsdstats-6.0_2, I see:
>
> The machine contacts the proxy with: HEAD.http://rpt.bsdstats.org/.
> Reply: HTTP/1.0.302Moved.Temporarily
>
> Then the machine contacts the proxy with: GET.http://rpt.bsdstats.org/sc
> Reply: HTTP/1.0.500.Internal.Server
>
> Best regards,
>
> Olivier
>
> On Fri, Jan 5, 2018 at 8:24 AM, Marc G Fournier <[hidden email]> wrote:
>>
>> You should be able to just add them to /etc/periodic.conf … bsdstats on FreeBSD will read its environment variables from there …
>>
>>
>>
>>> On Nov 14, 2017, at 23:45, Matthew Seaman <[hidden email]> wrote:
>>>
>>> On 15/11/2017 05:19, Olivier wrote:
>>>> Hi,
>>>>
>>>> I would like to enable bsdstats to run, but I need to configure a proxy.
>>>>
>>>> I see it rely on the environment variable HTTP_PROXY, but where should I
>>>> define it so that it is used by the monthly periodic script and by
>>>> bsdstats launched at boot?
>>>>
>>>> TIA,
>>>>
>>>> Olivier
>>>>
>>>
>>> /etc/login.conf should work for you.  You can add whatever environment
>>> settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.
>>>
>>> Remember to run 'cap_mkdb /etc/login.conf' after editing the file.
>>>
>>>      Cheers,
>>>
>>>      Matthew
>>>
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "[hidden email]"
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[hidden email]"

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Running bsdstats through a proxy

Marc Fournier-4

Worked with Olivier … PROXY issue he was experiencing has been resolved …



> On Jan 4, 2018, at 20:18, Marc G Fournier <[hidden email]> wrote:
>
>
> Hrmmm … I didn’t write the PROXY code, so if anyone is familiar with proxies, please feel free to step up … but could you modify the code ( /usr/local/etc/periodic/monthly/300.statistics ) and change the first line to state:
>
> #!/bin/sh -x
>
> ( note, just adding the x to the end of hte line )
>
> then send me the output ( privately, not to the list ) of:
>
> /usr/local/etc/periodic/monthly/300.statistics -nodelay
>
> that should let me see how its re-writing things … for starters, the truncation at ‘/sc’ is odd, since it should be something like:
>
> /scripts/enable_token.php…
>
>
>
>> On Jan 4, 2018, at 19:50, Olivier Nicole <[hidden email]> wrote:
>>
>> Marc,
>>
>> On a new machine (FreeBSD 11.1-RELEASE-p6) with bsdstats-6.0_2, I see:
>>
>> The machine contacts the proxy with: HEAD.http://rpt.bsdstats.org/.
>> Reply: HTTP/1.0.302Moved.Temporarily
>>
>> Then the machine contacts the proxy with: GET.http://rpt.bsdstats.org/sc
>> Reply: HTTP/1.0.500.Internal.Server
>>
>> Best regards,
>>
>> Olivier
>>
>> On Fri, Jan 5, 2018 at 8:24 AM, Marc G Fournier <[hidden email]> wrote:
>>>
>>> You should be able to just add them to /etc/periodic.conf … bsdstats on FreeBSD will read its environment variables from there …
>>>
>>>
>>>
>>>> On Nov 14, 2017, at 23:45, Matthew Seaman <[hidden email]> wrote:
>>>>
>>>> On 15/11/2017 05:19, Olivier wrote:
>>>>> Hi,
>>>>>
>>>>> I would like to enable bsdstats to run, but I need to configure a proxy.
>>>>>
>>>>> I see it rely on the environment variable HTTP_PROXY, but where should I
>>>>> define it so that it is used by the monthly periodic script and by
>>>>> bsdstats launched at boot?
>>>>>
>>>>> TIA,
>>>>>
>>>>> Olivier
>>>>>
>>>>
>>>> /etc/login.conf should work for you.  You can add whatever environment
>>>> settings you want to the  :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ line.
>>>>
>>>> Remember to run 'cap_mkdb /etc/login.conf' after editing the file.
>>>>
>>>>     Cheers,
>>>>
>>>>     Matthew
>>>>
>>>
>>> _______________________________________________
>>> [hidden email] mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to "[hidden email]"
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "[hidden email]"
>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[hidden email]"

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[hidden email]"