Revision 63b66016 debian/postinst

b/debian/postinst
1 1
#!/bin/sh -e
2 2

  
3 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 4
	if ! getent group vncauthproxy >/dev/null; then
9 5
		addgroup --system --quiet vncauthproxy
10 6
	fi
7

  
8
	if ! getent passwd vncauthproxy >/dev/null; then
9
		adduser --quiet --system --no-create-home --home /var/run/vncauthproxy --ingroup vncauthproxy --shell /usr/sbin/nologin vncauthproxy
10
	fi
11

  
11 12
}
12 13

  
13 14
setup_vncauthproxy_user
14 15

  
15 16
case "$1" in
16 17
    configure)
17
        chown vncauthproxy:vncauthproxy /var/log/vncauthproxy
18
        chown vncauthproxy:vncauthproxy /var/lib/vncauthproxy
19

  
20
        echo "Starting snf-vncauthproxy..."
21
        echo
22
        if [ -x "/usr/sbin/invoke-rc.d" ]; then
23
            invoke-rc.d vncauthproxy start
24
        else
25
            /etc/init.d/vncauthproxy start
26
        fi
27 18
    ;;
28 19

  
29 20
    abort-upgrade|abort-remove|abort-deconfigure)

Also available in: Unified diff