Denys Vlasenko | f5c2f72 | 2009-11-08 00:55:39 +0100 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | user=logger | ||||
4 | |||||
5 | logdir="/var/log/service/`(cd ..;basename $PWD)`" | ||||
6 | mkdir -p "$logdir" 2>/dev/null | ||||
7 | chown -R "$user": "$logdir" | ||||
8 | chmod -R go-rwxst,u+rwX "$logdir" | ||||
9 | rm logdir | ||||
10 | ln -s "$logdir" logdir | ||||
11 | |||||
12 | # make this dir accessible to logger | ||||
13 | chmod a+rX . | ||||
14 | |||||
15 | exec >/dev/null | ||||
16 | exec 2>&1 | ||||
17 | exec \ | ||||
18 | env - PATH="$PATH" \ | ||||
19 | softlimit \ | ||||
20 | setuidgid "$user" \ | ||||
21 | svlogd -tt "$logdir" |