~ubuntu-branches/ubuntu/gutsy/stunnel4/gutsy

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lemoine
  • Date: 2006-11-07 20:22:04 UTC
  • mfrom: (3.1.5 feisty)
  • Revision ID: james.westby@ubuntu.com-20061107202204-b8b3rivwi3nla2pz
Tags: 3:4.18-2
* Updated chroot default path in configuration file
* Added LSB section in init script

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
GROUPMOD="/usr/sbin/groupmod"
11
11
#GROUPDEL="/usr/sbin/groupdel"
12
12
 
13
 
if ! test -d /var/run/stunnel4; then
14
 
  rm -rf /var/run/stunnel4;
15
 
  mkdir /var/run/stunnel4
16
 
fi
17
 
 
18
13
###
19
14
# 1. get current stunnel uid and gid if user exists.
20
15
set -e
41
36
  $ADDUSER --system --disabled-password --disabled-login        \
42
37
           --home /var/run/stunnel4                     \
43
38
           --no-create-home --group $USER
44
 
  $CHOWN $USER:$USER /var/run/stunnel4 || /bin/true
45
 
fi
 
39
fi
 
40
 
 
41
# /var/run/stunnel4 is not a directory, create it...
 
42
if ! test -d /var/run/stunnel4; then
 
43
  rm -rf /var/run/stunnel4;
 
44
  mkdir /var/run/stunnel4
 
45
fi
 
46
$CHOWN $USER:$USER /var/run/stunnel4 || /bin/true
46
47
 
47
48
# /var/log/stunnel4 is not a directory, create it...
48
49
if ! test -d /var/log/stunnel4; then
49
50
  rm -rf /var/log/stunnel4;
50
51
  mkdir /var/log/stunnel4
51
52
fi
52
 
 
53
 
touch /var/log/stunnel4/stunnel.log
54
53
$CHOWN -R $USER:$USER /var/log/stunnel4
55
 
$CHOWN -R $USER:$USER /var/run/stunnel4
 
54
 
 
55
# /var/lib/stunnel4 is not a directory, create it...
 
56
if ! test -d /var/lib/stunnel4; then
 
57
  rm -rf /var/lib/stunnel4;
 
58
  mkdir /var/lib/stunnel4
 
59
fi
 
60
$CHOWN -R $USER:$USER /var/lib/stunnel4
 
61
 
 
62
if ! test -f /var/log/stunnel4/stunnel.log; then
 
63
  touch /var/log/stunnel4/stunnel.log
 
64
  $CHOWN -R $USER:$USER /var/log/stunnel4/stunnel.log
 
65
fi
56
66
 
57
67
if [ -x "/etc/init.d/stunnel4" ]; then
58
68
        if [ -x /usr/sbin/invoke-rc.d ] ; then
61
71
                /etc/init.d/stunnel4 stop
62
72
        fi
63
73
fi
 
74
if [ "$1" = "configure" ]; then
 
75
        ldconfig
 
76
fi
64
77
 
65
78
#DEBHELPER#