Browse Source

Make startup scripts whitespace-safe.

This is in preparation for future parameters which
may contain whitespaces.
tags/1.0
Timo Röhling 11 years ago
parent
commit
9689ece89f
2 changed files with 3 additions and 4 deletions
  1. 2
    3
      postsrsd.init.in
  2. 1
    1
      postsrsd.upstart.in

+ 2
- 3
postsrsd.init.in View File

@@ -41,8 +41,6 @@ then
41 41
     . /etc/default/$NAME
42 42
 fi
43 43
 
44
-POSTSRS_OPTS="-4 -f$SRS_FORWARD_PORT -r$SRS_REVERSE_PORT -d$SRS_DOMAIN -s$SRS_SECRET -u$RUN_AS -p$PIDFILE -c$CHROOT -D"
45
-
46 44
 test -r "$SRS_SECRET" -a -n "$SRS_DOMAIN" || exit 0
47 45
 
48 46
 ret=0
@@ -52,7 +50,8 @@ case "$1" in
52 50
 	if start-stop-daemon --start --oknodo --quiet \
53 51
 		--pidfile $PIDFILE \
54 52
 		--name $NAME \
55
-		--startas $DAEMON -- $POSTSRS_OPTS
53
+		--startas $DAEMON \
54
+		-- -4 -f"$SRS_FORWARD_PORT" -r"$SRS_REVERSE_PORT" -d"$SRS_DOMAIN" -s"$SRS_SECRET" -u"$RUN_AS" -p"$PIDFILE" -c"$CHROOT" -D
56 55
 	then
57 56
 	    log_end_msg 0
58 57
 	else

+ 1
- 1
postsrsd.upstart.in View File

@@ -17,6 +17,6 @@ script
17 17
 	if [ -r "$DEFAULTFILE" ]; then
18 18
 		. "$DEFAULTFILE"
19 19
 	fi
20
-	exec @CMAKE_INSTALL_PREFIX@/sbin/@POSTSRSD@ -4 -f$SRS_FORWARD_PORT -r$SRS_REVERSE_PORT -d$SRS_DOMAIN -s$SRS_SECRET -u$RUN_AS -c$CHROOT
20
+	exec @CMAKE_INSTALL_PREFIX@/sbin/@POSTSRSD@ -4 -f"$SRS_FORWARD_PORT" -r"$SRS_REVERSE_PORT" -d"$SRS_DOMAIN" -s"$SRS_SECRET" -u"$RUN_AS" -c"$CHROOT"
21 21
 end script
22 22
 

Loading…
Cancel
Save