aboutsummaryrefslogtreecommitdiff
path: root/www/privoxy/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-10 22:47:05 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-10 22:47:05 +0000
commit903667fec9e781f27fdcd284849ec589ad355c31 (patch)
treea0115df4a778eb6a9e1e8e36f2832c75837de24e /www/privoxy/files
parent794affa388c5ccdb2756100d83b1d51f02157f64 (diff)
downloadports-903667fec9e781f27fdcd284849ec589ad355c31.tar.gz
ports-903667fec9e781f27fdcd284849ec589ad355c31.zip
Notes
Diffstat (limited to 'www/privoxy/files')
-rw-r--r--www/privoxy/files/patch-cgi.c15
-rw-r--r--www/privoxy/files/patch-cgiedit.c32
-rw-r--r--www/privoxy/files/pkg-message.in24
-rw-r--r--www/privoxy/files/privoxy.in5
4 files changed, 65 insertions, 11 deletions
diff --git a/www/privoxy/files/patch-cgi.c b/www/privoxy/files/patch-cgi.c
new file mode 100644
index 000000000000..fdb6a1d31d4c
--- /dev/null
+++ b/www/privoxy/files/patch-cgi.c
@@ -0,0 +1,15 @@
+--- cgi.c Mon Nov 13 20:05:50 2006
++++ cgi.c Sat Dec 9 14:49:16 2006
+@@ -571,10 +579,12 @@
+ "Look up which actions apply to a URL and why",
+ TRUE },
+ #ifdef FEATURE_CGI_EDIT_ACTIONS
++#ifdef FEATURE_TOGGLE
+ { "toggle",
+ cgi_toggle,
+ "Toggle Privoxy on or off",
+ FALSE },
++#endif /* def FEATURE_TOGGLE */
+ { "edit-actions", /* Edit the actions list */
+ cgi_edit_actions,
+ NULL, FALSE },
diff --git a/www/privoxy/files/patch-cgiedit.c b/www/privoxy/files/patch-cgiedit.c
new file mode 100644
index 000000000000..0d83b7b96ca3
--- /dev/null
+++ b/www/privoxy/files/patch-cgiedit.c
@@ -0,0 +1,32 @@
+--- cgiedit.c Tue Jul 18 16:48:45 2006
++++ cgiedit.c Sat Dec 9 14:49:16 2006
+@@ -333,8 +337,10 @@
+ #include "miscutil.h"
+ #include "errlog.h"
+ #include "loaders.h"
+-#include "loadcfg.h"
++#ifdef FEATURE_TOGGLE
+ /* loadcfg.h is for global_toggle_state only */
++#include "loadcfg.h"
++#endif /* def FEATURE_TOGGLE */
+ #include "urlmatch.h"
+
+ const char cgiedit_h_rcs[] = CGIEDIT_H_VERSION;
+@@ -4232,7 +4238,7 @@
+ return cgi_redirect(rsp, target);
+ }
+
+-
++#ifdef FEATURE_TOGGLE
+ /*********************************************************************
+ *
+ * Function : cgi_toggle
+@@ -4300,7 +4306,7 @@
+
+ return template_fill_for_cgi(csp, template_name, exports, rsp);
+ }
+-
++#endif /* def FEATURE_TOGGLE */
+
+ /*********************************************************************
+ *
diff --git a/www/privoxy/files/pkg-message.in b/www/privoxy/files/pkg-message.in
index c4bd244652bc..be30cf9ec574 100644
--- a/www/privoxy/files/pkg-message.in
+++ b/www/privoxy/files/pkg-message.in
@@ -1,13 +1,6 @@
***********************************************************
-** Privoxy's default configuration file is: **
-** %%PREFIX%%/etc/privoxy/config **
-** It gets overwritten on (re)install, if you make your **
-** own modifications, you should rename it first. **
-** **
** To start Privoxy on boot, add: privoxy_enable="YES" **
-** to /etc/rc.conf. If you changed the location of the **
-** configuration file, additionally add: **
-** privoxy_config="%%PREFIX%%/etc/privoxy/your-config" **
+** to /etc/rc.conf. **
** **
** To start Privoxy manually, run: **
** %%PREFIX%%/etc/rc.d/privoxy forcestart **
@@ -15,11 +8,20 @@
** in rc(8), it also contains a list of other rc **
** variables you can use. **
** **
+** Privoxy example files were copied to: **
+** %%PREFIX%%/share/examples/privoxy **
+** **
+** For documentation see: **
+** %%PREFIX%%/share/doc/privoxy-manual or 'man privoxy' **
+** **
+** Note that default.filter, standard.action and **
+** default.action get overwritten with each Privoxy **
+** update. Instead of changing them you should use **
+** your own action and filter files as described in **
+** Privoxy's manual. **
+** **
** If you installed Privoxy as package and are using the **
** default configuration, you have to make sure the **
** directories /var/log/privoxy and /var/run/privoxy **
** exist and are owned by privoxy:privoxy. **
-** **
-** For documentation see: **
-** %%PREFIX%%/share/doc/privoxy-manual or 'man privoxy' **
***********************************************************
diff --git a/www/privoxy/files/privoxy.in b/www/privoxy/files/privoxy.in
index 56814f098e08..5e44c6497868 100644
--- a/www/privoxy/files/privoxy.in
+++ b/www/privoxy/files/privoxy.in
@@ -34,6 +34,11 @@ load_rc_config ${name}
: ${privoxy_user="privoxy"}
: ${privoxy_pidfile="/var/run/privoxy/privoxy.pid"}
+start_precmd="if [ ! -e ${privoxy_config} ]; then\
+ echo ${privoxy_config} not found. Copying default configuration.;\
+ cp %%PREFIX%%/share/examples/privoxy/config ${privoxy_config};\
+ chown ${privoxy_user}:${privoxy_user} ${privoxy_config};\
+fi"
command="%%PREFIX%%/sbin/privoxy"
command_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}"