Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lmich:SLE
privoxy
privoxy-3.0.6-init.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File privoxy-3.0.6-init.patch of Package privoxy
diff -ur privoxy-orig/privoxy.init.suse privoxy-3.0.3-stable/privoxy.init.suse --- privoxy-orig/privoxy.init.suse 2003-03-17 15:04:16.000000000 +0100 +++ privoxy-3.0.3-stable/privoxy.init.suse 2005-08-22 11:14:34.129217052 +0200 @@ -85,7 +85,19 @@ start) echo -n "Starting Privoxy" if [ ! -f /var/run/privoxy.pid ] || ! kill -0 `cat /var/run/privoxy.pid` 2> /dev/null; then - /usr/sbin/privoxy --user privoxy.privoxy --pidfile /var/run/privoxy.pid /etc/privoxy/config 2> /dev/null + # set up chroot dir + for i in /etc/{resolv.conf,host.conf,hosts,localtime}; do + cp -p $i /var/lib/privoxy/etc/ &>/dev/null \ + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + done + libdir=/$(basename $(echo /var/lib/privoxy/lib*)) + for i in /$libdir/{libresolv.so.2,libnss_dns{,6}.so.2}; do + if [ -s $i ]; then + cp -p $i /var/lib/privoxy/$libdir/ \ + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + fi + done + /usr/sbin/privoxy --user privoxy.privoxy --pidfile /var/run/privoxy.pid --chroot /etc/config 2> /dev/null else false fi @@ -94,6 +106,11 @@ stop) echo -n "Shutting down Privoxy" killproc -TERM /usr/sbin/privoxy && rm -f /var/run/privoxy.pid + + # remove libraries from the chroot jail, just so they are not left over + # if the server is deinstalled + rm -f /var/lib/privoxy/lib*/* + rc_status -v ;; reload) @@ -102,7 +119,7 @@ rc_status -v ;; try-restart) - $0 stop && $0 start + $0 status >/dev/null && $0 restart rc_status ;; restart)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor