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
     . /etc/default/$NAME
41
     . /etc/default/$NAME
42
 fi
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
 test -r "$SRS_SECRET" -a -n "$SRS_DOMAIN" || exit 0
44
 test -r "$SRS_SECRET" -a -n "$SRS_DOMAIN" || exit 0
47
 
45
 
48
 ret=0
46
 ret=0
52
 	if start-stop-daemon --start --oknodo --quiet \
50
 	if start-stop-daemon --start --oknodo --quiet \
53
 		--pidfile $PIDFILE \
51
 		--pidfile $PIDFILE \
54
 		--name $NAME \
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
 	then
55
 	then
57
 	    log_end_msg 0
56
 	    log_end_msg 0
58
 	else
57
 	else

+ 1
- 1
postsrsd.upstart.in View File

17
 	if [ -r "$DEFAULTFILE" ]; then
17
 	if [ -r "$DEFAULTFILE" ]; then
18
 		. "$DEFAULTFILE"
18
 		. "$DEFAULTFILE"
19
 	fi
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
 end script
21
 end script
22
 
22
 

Loading…
Cancel
Save