diff options
Diffstat (limited to 'examples/etc/ninit/dnscache/setup')
| -rwxr-xr-x | examples/etc/ninit/dnscache/setup | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/etc/ninit/dnscache/setup b/examples/etc/ninit/dnscache/setup new file mode 100755 index 0000000..dfd6c92 --- /dev/null +++ b/examples/etc/ninit/dnscache/setup @@ -0,0 +1,11 @@ +#!/bin/dash +cd /etc/dnscache/root/dump || exit 1 +[ "$1" != "dnscache" -o "$2" = "" ] && exit 1 +export PATH=/bin:/usr/bin:/usr/local/bin +( + sleep 30 + pid=`nsvc -g dnscache` + [ $? -eq 0 -a "$pid" = "$2" ] && \ + setuidgid dnscache dnscache-compact -$pid data data.xxx data +) & +exit 0 |
