add a nice friendly error if the certificate for stunnel are not
present.
This commit is contained in:
parent
c26cf3d1fd
commit
75953f1885
1 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,16 @@ fi
|
|||
|
||||
PORT=$(($$ % 10000 + 10000))
|
||||
|
||||
if [ ! -f server.crt ]; then
|
||||
echo "generate some certificate \"server.crt\""
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -f server.key ]; then
|
||||
echo "generate some private key \"server.key\""
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "running stunnel"
|
||||
${STUNNEL} server -c server.crt -k server.key --source=localhost:${PORT} --destinationtype=fd --destination=2 > stunnel-gnutls-log 2>&1 &
|
||||
stunnelpid=$(pidof stunnel)
|
||||
|
|
Loading…
Reference in a new issue