/usr/share/doc/socat
NameSizeModeActions
BUGREPORTS7460644editdlrm
CHANGES691810644editdlrm
COPYING180920644editdlrm
COPYING.OpenSSL62790644editdlrm
daemon.sh9030644editdlrm
DEVELOPMENT92100644editdlrm
EXAMPLES174190644editdlrm
FAQ38410644editdlrm
ftp.sh42180644editdlrm
gatherinfo.sh41220644editdlrm
mail.sh20660644editdlrm
PORTING30950644editdlrm
proxy.sh20370644editdlrm
proxyecho.sh12260644editdlrm
readline-test.sh12860644editdlrm
readline.sh7640644editdlrm
README117440644editdlrm
SECURITY18490644editdlrm
socat_buildscript_for_android.sh35790644editdlrm
socks4a-echo.sh25810644editdlrm
socks4echo.sh23670644editdlrm
test.sh4672760644editdlrm
Edit: /usr/share/doc/socat/daemon.sh (903B)
#! /bin/sh # source: daemon.sh # Copyright Gerhard Rieger and contributors (see file CHANGES) # Published under the GNU General Public License V.2, see file COPYING # This script assumes that you create group daemon1 and user daemon1 before. # they need only the right to exist (no login etc.) # Note: this pid file mechanism is not robust! # You will adapt these variables USER=daemon1 GROUP=daemon1 INIF=fwnonsec.domain.org OUTIF=fwsec.domain.org TARGET=w3.intra.domain.org INPORT=80 DSTPORT=80 # INOPTS="fork,setgid=$GROUP,setuid=$USER" OUTOPTS= PIDFILE=/var/run/socat-$INPORT.pid OPTS="-d -d -lm" # notice to stderr, then to syslog SOCAT=/usr/local/bin/socat if [ "$1" = "start" -o -z "$1" ]; then $SOCAT $OPTS tcp-l:$INPORT,bind=$INIF,$INOPTS tcp:$TARGET:$DSTPORT,bind=$OUTIF,$OUTOPTS $PIDFILE elif [ "$1" = "stop" ]; then /bin/kill $(/bin/cat $PIDFILE) fi