diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2009-02-23 23:05:31 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2009-02-23 23:05:31 +0000 |
commit | 072ebe34231539cbfd7b737982364512d3650b46 (patch) | |
tree | 5708c5e765e702e5e632921b17e787d95cb2672d /www/privoxy/files | |
parent | 2a631115b77cf9f54a284b9538d70b0f6289c7dd (diff) | |
download | ports-072ebe34231539cbfd7b737982364512d3650b46.tar.gz ports-072ebe34231539cbfd7b737982364512d3650b46.zip |
Notes
Diffstat (limited to 'www/privoxy/files')
-rw-r--r-- | www/privoxy/files/pkg-message.in | 9 | ||||
-rw-r--r-- | www/privoxy/files/privoxy.in | 23 |
2 files changed, 20 insertions, 12 deletions
diff --git a/www/privoxy/files/pkg-message.in b/www/privoxy/files/pkg-message.in index 2887e1a2ebd7..55d510fb3da0 100644 --- a/www/privoxy/files/pkg-message.in +++ b/www/privoxy/files/pkg-message.in @@ -14,11 +14,10 @@ For documentation see: %%DOCSDIR%%/user-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. + Note that default.filter 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 diff --git a/www/privoxy/files/privoxy.in b/www/privoxy/files/privoxy.in index 5e44c6497868..7ebe77cdf1f5 100644 --- a/www/privoxy/files/privoxy.in +++ b/www/privoxy/files/privoxy.in @@ -4,7 +4,7 @@ # # # PROVIDE: privoxy -# REQUIRE: NETWORKING +# REQUIRE: DAEMON # BEFORE: LOGIN # # This rc script understands the following variables @@ -34,14 +34,23 @@ 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" +config_file_check () { + if [ ! -e ${privoxy_config} ]; then + echo config file not found. Copying the example file to ${privoxy_config}. + cp %%PREFIX%%/share/examples/privoxy/config ${privoxy_config} + chown ${privoxy_user}:${privoxy_user} ${privoxy_config}; + fi + actionfile="%%PREFIX%%/etc/privoxy/match-all.action" + if [ ! -e ${actionfile} ]; then + echo ${actionfile} not found. Copying the example file. + cp %%PREFIX%%/share/examples/privoxy/match-all.action ${actionfile} + chown ${privoxy_user}:${privoxy_user} ${actionfile} + fi +} + +start_precmd="config_file_check" command="%%PREFIX%%/sbin/privoxy" command_args="${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_config}" run_rc_command "$1" - |