forked from qo-op/G1BILLET
LOG REDIRECTION
This commit is contained in:
parent
b813488a3f
commit
e9f5294a85
16
G1BILLETS.sh
16
G1BILLETS.sh
@ -108,7 +108,7 @@ echo "$ZFILE" ### LAST LINE : INFORM DAEMON
|
||||
else
|
||||
################################################################################
|
||||
## MAKE IT A NETWORK MICRO SERVICE -- PORTS : INPUT=33101 OUTPUT=33102
|
||||
############## CLEAN START DEAMON MODE ###
|
||||
############## CLEAN START DAEMON MODE ###
|
||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33101" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
||||
[[ $pidportinuse ]] && echo "KILLING OLD DEAMON 33101 $pidportinuse" && kill -9 $pidportinuse && killall G1BILLETS.sh
|
||||
|
||||
@ -163,13 +163,23 @@ function countdown() {
|
||||
|
||||
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
|
||||
while true; do
|
||||
#### LOG REDIRECTION
|
||||
echo "=================================================="
|
||||
echo "$ME DAEMON READY"
|
||||
echo "PLANCHE : $HNAME:33101"
|
||||
echo "TICKET : $HNAME:33101/?montant=10&style=ticket"
|
||||
echo "ASTRO TW : $HNAME:33101/?montant=0&style=astro${RANDOM}@yopmail.com"
|
||||
echo "=================================================="
|
||||
echo "LOG : tail -f ${MY_PATH}/tmp/G1BILLETS.log"
|
||||
echo "=================================================="
|
||||
mkdir -p ${MY_PATH}/tmp
|
||||
exec 2>&1 >> ${MY_PATH}/tmp/G1BILLETS.log
|
||||
|
||||
while true; do
|
||||
echo "=================================================="
|
||||
echo "$ME DAEMON READY"
|
||||
echo "=================================================="
|
||||
echo "LOG : ON"
|
||||
echo "=================================================="
|
||||
REQ=$(echo "$HTTPWELLCOME" | nc -l -p 33101 -q 1) ## # WAIT FOR 33101 PORT CONTACT
|
||||
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
|
Loading…
Reference in New Issue
Block a user