Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/doc/socat/examples/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #! /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 </dev/null &
echo $! >$PIDFILE
elif [ "$1" = "stop" ]; then
/bin/kill $(/bin/cat $PIDFILE)
fi
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]-- |