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 2018-05-13 09:47:29 +02:00 committed by GitHub
parent 808f7be000
commit 318799b0aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,13 @@
#! /bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo 'simpsh-httpd Copyright (C) 2018 niansa
This program comes with ABSOLUTELY NO WARRANTY; for details read "'"$(pwd)/LICENSE.md"'".
This is free software, and you are welcome to redistribute it under certain conditions; read "'"$(pwd)/LICENSE.md"'" for details.
'
. ./config.sh
. $DIR/config.sh
echo "Listening at Port $PORT"
if [ "$1" = "-d" -o "$1" = "--daemon" ]; then
setsid socat TCP-LISTEN:$PORT,reuseaddr,fork SYSTEM:"./main.sh" > /dev/null 2>&1 &