START FILE, --- lines are not part of file
---------------------------------------------------
#!/bin/sh
#bof
# Diversion is free to use under the GNU General Public License version 3 (GPL- 3.0)
#
https://opensource.org/licenses/GPL-3.0
# Proudly coded by thelonelycoder
# Copyright (C) 2018 thelonelycoder - All Rights Reserved
#
https://www.snbforums.com/members/thelonelycoder.25480/
#
https://diversion.ch
# Script Version 4.0.4
# set environment PATH to system binaries
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
if [ -f /opt/share/diversion/.conf/diversion.conf ]; then
. /opt/share/diversion/.conf/diversion.conf
if [ "$DIVERSION_STATUS" = "enabled" ] && [ "$psState" = "on" ]; then
switchesFile=/opt/share/diversion/.conf/pixelserv.switches
[ -f "$switchesFile" ] && switches=$(cat $switchesFile | tr '\n' ' ') || switches=
if [ -z "$1" ] || [ "$1" != "stop" ]; then
ifconfig br0
ixelserv-tls $psIP up
logger -t Diversion "created br0
ixelserv-tls $psIP, fr om $0"
fi
export TZ=$(cat /etc/TZ)
ENABLED=yes
PROCS=pixelserv-tls
ARGS="$psIP $switches"
PREARGS=""
PRECMD=""
DESC="$PROCS (Diversion)"
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/ bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func.div
else
logger -t Diversion "pixelserv-tls or Diversion disabled, not st arting pixelserv-tls, from $0"
fi
else
logger -t Diversion "diversion.conf file not found, not starting pixelse rv-tls, from $0"
fi
#eof
---------------------------------------------------
END FILE