Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
99e5c159
Commit
99e5c159
authored
Feb 04, 2024
by
neil
Browse files
check socat "Permission denied"
parent
802121d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
99e5c159
...
@@ -2519,12 +2519,21 @@ _startserver() {
...
@@ -2519,12 +2519,21 @@ _startserver() {
_content_len
=
"
$(
printf
"%s"
"
$content
"
|
wc
-c
)
"
_content_len
=
"
$(
printf
"%s"
"
$content
"
|
wc
-c
)
"
_debug _content_len
"
$_content_len
"
_debug _content_len
"
$_content_len
"
_debug
"_NC"
"
$_NC
$SOCAT_OPTIONS
"
_debug
"_NC"
"
$_NC
$SOCAT_OPTIONS
"
_socaterr
=
"
$(
_mktemp
)
"
$_NC
$SOCAT_OPTIONS
SYSTEM:
"sleep 1;
\
$_NC
$SOCAT_OPTIONS
SYSTEM:
"sleep 1;
\
echo 'HTTP/1.0 200 OK';
\
echo 'HTTP/1.0 200 OK';
\
echo 'Content-Length
\:
$_content_len
';
\
echo 'Content-Length
\:
$_content_len
';
\
echo '';
\
echo '';
\
printf '%s' '
$content
';"
&
printf '%s' '
$content
';"
2>
"
$_socaterr
"
&
serverproc
=
"
$!
"
serverproc
=
"
$!
"
if
[
-f
"
$_socaterr
"
]
;
Then
if
grep
"Permission denied"
"
$_socaterr
"
>
/dev/null
;
Then
_err
"socat:
$(
cat
$_socaterr
)
"
_err
"Can not listen for user:
$(
whoami
)
"
_err
"Maybe try with root again?"
return
1
fi
fi
}
}
_stopserver
()
{
_stopserver
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment