diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-11-15 20:40:10 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-11-15 20:40:10 +0100 |
commit | 75f2ac2312c3b98e94bb98941074fa85aba03841 (patch) | |
tree | 357980aaa9a4e6b4e892433fcec02ec59dd886a6 /package/privoxy/files | |
parent | 4fc73402ed1cec95693ee5e8549cef6c3079717f (diff) |
update privoxy package
- add /etc/privoxy
- add postinst script for user/group add
- add init script
Diffstat (limited to 'package/privoxy/files')
-rw-r--r-- | package/privoxy/files/privoxy.init | 27 | ||||
-rw-r--r-- | package/privoxy/files/privoxy.postinst | 7 |
2 files changed, 34 insertions, 0 deletions
diff --git a/package/privoxy/files/privoxy.init b/package/privoxy/files/privoxy.init new file mode 100644 index 000000000..ab782e9ef --- /dev/null +++ b/package/privoxy/files/privoxy.init @@ -0,0 +1,27 @@ +#!/bin/sh +#PKG privoxy +#INIT 70 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + [[ $privoxy = NO ]] && exit 0 + exec sh $0 start + ;; +start) + [ -f /etc/privoxy/config ] || exit + /usr/sbin/privoxy /etc/privoxy + ;; +stop) + pkill privoxy + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + ;; +esac +exit $? diff --git a/package/privoxy/files/privoxy.postinst b/package/privoxy/files/privoxy.postinst new file mode 100644 index 000000000..105b430c2 --- /dev/null +++ b/package/privoxy/files/privoxy.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh + +gid=$(get_next_gid) +add_user privoxy $(get_next_uid) $gid /etc/privoxy +add_group privoxy $gid +add_rcconf privoxy privoxy NO |