Browse Source

Use Postfix mydomain as SRS_DOMAIN default value

tags/1.0
Timo Röhling 12 years ago
parent
commit
9ea7d2b6a0
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      postsrsd.init.in

+ 2
- 2
postsrsd.init.in View File

28
 . /lib/lsb/init-functions
28
 . /lib/lsb/init-functions
29
 
29
 
30
 # Default configuration
30
 # Default configuration
31
-SRS_DOMAIN=`[ ! -r /etc/mailname ] || cat /etc/mailname | cut -d. -f2-`
31
+SRS_DOMAIN=`postconf -h mydomain || true`
32
 SRS_FORWARD_PORT=10001
32
 SRS_FORWARD_PORT=10001
33
 SRS_REVERSE_PORT=10002
33
 SRS_REVERSE_PORT=10002
34
 SRS_SECRET=/etc/@PROJECT_NAME@.secret
34
 SRS_SECRET=/etc/@PROJECT_NAME@.secret
42
 
42
 
43
 POSTSRS_OPTS="-4 -f$SRS_FORWARD_PORT -r$SRS_REVERSE_PORT -d$SRS_DOMAIN -s$SRS_SECRET -u$RUN_AS -p$PIDFILE -D"
43
 POSTSRS_OPTS="-4 -f$SRS_FORWARD_PORT -r$SRS_REVERSE_PORT -d$SRS_DOMAIN -s$SRS_SECRET -u$RUN_AS -p$PIDFILE -D"
44
 
44
 
45
-test -r "$SRS_SECRET" || exit 0
45
+test -r "$SRS_SECRET" -a -n "$SRS_DOMAIN" || exit 0
46
 
46
 
47
 ret=0
47
 ret=0
48
 case "$1" in
48
 case "$1" in

Loading…
Cancel
Save