root / debian / postinst @ a1ff1169
History | View | Annotate | Download (940 Bytes)
1 |
#!/bin/sh -e |
---|---|
2 |
|
3 |
setup_vncauthproxy_user() { |
4 |
if ! getent passwd vncauthproxy >/dev/null; then |
5 |
adduser --quiet --system --no-create-home --home /var/run/vncauthproxy --shell /usr/sbin/nologin vncauthproxy |
6 |
fi |
7 |
|
8 |
if ! getent group vncauthproxy >/dev/null; then |
9 |
addgroup --system --quiet vncauthproxy |
10 |
fi |
11 |
} |
12 |
|
13 |
setup_vncauthproxy_user |
14 |
|
15 |
case "$1" in |
16 |
configure) |
17 |
chown vncauthproxy:vncauthproxy /var/log/vncauthproxy |
18 |
chown vncauthproxy:vncauthproxy /var/lib/vncauthproxy |
19 |
|
20 |
echo "Updating rc.d links... " |
21 |
update-rc.d vncauthproxy defaults |
22 |
echo "Starting snf-vncauthproxy...\n" |
23 |
if [ -x "/usr/sbin/invoke-rc.d" ]; then |
24 |
invoke-rc.d vncauthproxy start |
25 |
else |
26 |
/etc/init.d/vncauthproxy start |
27 |
fi |
28 |
;; |
29 |
|
30 |
abort-upgrade|abort-remove|abort-deconfigure) |
31 |
;; |
32 |
|
33 |
*) |
34 |
echo "postinst called with unknown argument \`$1'" >&2 |
35 |
exit 1 |
36 |
;; |
37 |
esac |
38 |
|
39 |
exit 0 |