1
0
Fork 0
mirror of https://gitlab.com/niansa/simpsh-httpd.git synced 2025-03-06 20:53:36 +01:00

Update start-socat.sh

This commit is contained in:
niansa 2017-12-26 11:22:04 +01:00 committed by GitHub
parent ee706a489e
commit 0cb83592eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
. ./config.sh
echo "Listening at Port: $PORT"
if [ "$1" = "-d" -o "$1" = "--daemon" ]; then
nohup socat TCP-LISTEN:$PORT,reuseaddr,fork SYSTEM:"./main.sh" > /dev/null 2>&1 &
setsid socat TCP-LISTEN:$PORT,reuseaddr,fork SYSTEM:"./main.sh" > /dev/null 2>&1 &
else
socat TCP-LISTEN:$PORT,reuseaddr,fork SYSTEM:"./main.sh" || exit 1
fi