File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ pip install -U letsencrypt letsencrypt-apache # letsencrypt-nginx
25
25
echo
26
26
echo " Congratulations, Let's Encrypt has been successfully installed/updated!"
27
27
echo
28
- echo -n " Your prompt should now be prepended with ($VENV_NAME ). Next "
29
- echo -n " time, if the prompt is different, 'source' this script again "
30
- echo -n " before running 'letsencrypt'."
28
+ printf " %s " " Your prompt should now be prepended with ($VENV_NAME ). Next "
29
+ printf " time, if the prompt is different, 'source' this script again "
30
+ printf " before running 'letsencrypt'."
31
31
echo
32
32
echo
33
33
echo " You can now run 'letsencrypt --help'."
Original file line number Diff line number Diff line change 73
73
fi
74
74
fi
75
75
76
- echo -n " Updating letsencrypt and virtual environment dependencies..."
76
+ printf " Updating letsencrypt and virtual environment dependencies..."
77
77
if [ " $VERBOSE " = 1 ] ; then
78
78
echo
79
79
$VENV_BIN /pip install -U setuptools
@@ -86,15 +86,15 @@ if [ "$VERBOSE" = 1 ] ; then
86
86
fi
87
87
else
88
88
$VENV_BIN /pip install -U setuptools > /dev/null
89
- echo -n .
89
+ printf .
90
90
$VENV_BIN /pip install -U pip > /dev/null
91
- echo -n .
91
+ printf .
92
92
# nginx is buggy / disabled for now...
93
93
$VENV_BIN /pip install -U letsencrypt > /dev/null
94
- echo -n .
94
+ printf .
95
95
$VENV_BIN /pip install -U letsencrypt-apache > /dev/null
96
96
if $VENV_BIN /pip freeze | grep -q letsencrypt-nginx ; then
97
- echo -n .
97
+ printf .
98
98
$VENV_BIN /pip install -U letsencrypt-nginx > /dev/null
99
99
fi
100
100
echo
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class Authenticator(common.Plugin):
70
70
CMD_TEMPLATE = """\
71
71
mkdir -p {root}/public_html/{response.URI_ROOT_PATH}
72
72
cd {root}/public_html
73
- echo -n {validation} > {response.URI_ROOT_PATH}/{encoded_token}
73
+ printf "%s" {validation} > {response.URI_ROOT_PATH}/{encoded_token}
74
74
# run only once per server:
75
75
$(command -v python2 || command -v python2.7 || command -v python2.6) -c \\
76
76
"import BaseHTTPServer, SimpleHTTPServer; \\
@@ -142,15 +142,14 @@ def _perform_single(self, achall):
142
142
ct = response .CONTENT_TYPE , port = port )
143
143
if self .conf ("test-mode" ):
144
144
logger .debug ("Test mode. Executing the manual command: %s" , command )
145
- # sh shipped with OS X does't support echo -n
146
- executable = "/bin/bash" if sys .platform == "darwin" else None
145
+ # sh shipped with OS X does't support echo -n, but supports printf
147
146
try :
148
147
self ._httpd = subprocess .Popen (
149
148
command ,
150
149
# don't care about setting stdout and stderr,
151
150
# we're in test mode anyway
152
151
shell = True ,
153
- executable = executable ,
152
+ executable = None ,
154
153
# "preexec_fn" is UNIX specific, but so is "command"
155
154
preexec_fn = os .setsid )
156
155
except OSError as error : # ValueError should not happen!
You can’t perform that action at this time.
0 commit comments