forked from qo-op/G1BILLET
choose security level (default dice=4)
This commit is contained in:
parent
12752efa91
commit
7f62642fc7
169
G1BILLETS.sh
169
G1BILLETS.sh
@ -10,7 +10,7 @@ ME="${0##*/}"
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Create different king of G1BILLET(s) with $MONTANT DU or TW IPNS
|
# Create different king of G1BILLET(s) with $MONTANT DU or TW IPNS
|
||||||
# ${MY_PATH}/G1BILLETS.sh 5 986397643 ticket # MONTANT # STYLE #
|
# ${MY_PATH}/G1BILLETS.sh 5 986397643 ticket # MONTANT # STYLE # SECURITE
|
||||||
################################################################################
|
################################################################################
|
||||||
MONTANT="$1"
|
MONTANT="$1"
|
||||||
[[ $MONTANT == "0" ]] && MONTANT=""
|
[[ $MONTANT == "0" ]] && MONTANT=""
|
||||||
@ -18,13 +18,14 @@ MONTANT="$1"
|
|||||||
### COMMAND MODE ###
|
### COMMAND MODE ###
|
||||||
if [[ $MONTANT != "daemon" ]]; then
|
if [[ $MONTANT != "daemon" ]]; then
|
||||||
|
|
||||||
[[ $MONTANT == "" ]] && MONTANT="___"
|
[[ $MONTANT == "" ]] && MONTANT="___"
|
||||||
|
|
||||||
STYLE="$2"
|
STYLE="$2"
|
||||||
|
|
||||||
DICE=$(cat $MY_PATH/DICE 2>/dev/null) ## HOW MANY WORDS SECRETS
|
DICE="$3"
|
||||||
[[ $DICE != ?(-)+([0-9]) ]] && DICE=4
|
[[ $DICE != ?(-)+([0-9]) ]] && DICE=$(cat $MY_PATH/DICE 2>/dev/null) ## HOW MANY WORDS SECRETS
|
||||||
# echo "$DICE WORDS SECRETS (Define length in $MY_PATH/DICE)"
|
[[ $DICE != ?(-)+([0-9]) ]] && DICE=4
|
||||||
|
# echo "$DICE WORDS SECRETS (Define length in $MY_PATH/DICE)"
|
||||||
|
|
||||||
## CHECK IF STYLE IS EMAIL => astro IPFS G1BILLET
|
## CHECK IF STYLE IS EMAIL => astro IPFS G1BILLET
|
||||||
if [[ "${STYLE}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
if [[ "${STYLE}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then
|
||||||
@ -32,26 +33,25 @@ DICE=$(cat $MY_PATH/DICE 2>/dev/null) ## HOW MANY WORDS SECRETS
|
|||||||
# echo "PLAYER : $STYLE"
|
# echo "PLAYER : $STYLE"
|
||||||
EMAIL=${STYLE}
|
EMAIL=${STYLE}
|
||||||
STYLE="xbian"
|
STYLE="xbian"
|
||||||
DICE=3
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## STYLE SELECTED: PDF DE 6 BILLETS OR SINGLE
|
## STYLE SELECTED: PDF DE 6 BILLETS OR SINGLE
|
||||||
NBbillets=6
|
NBbillets=6
|
||||||
[[ "${STYLE}" != "" ]] && NBbillets=1
|
[[ "${STYLE}" != "" ]] && NBbillets=1
|
||||||
|
|
||||||
echo "CREATION $NBbillets x G1BILLET - $STYLE - "
|
echo "CREATION $NBbillets x G1BILLET - $STYLE - "
|
||||||
|
|
||||||
# CHECK IF $STYLE IMAGES EXIST
|
# CHECK IF $STYLE IMAGES EXIST
|
||||||
[[ ! -f ${MY_PATH}/images/g1${STYLE}.png ]] && echo "AJOUTER : ./images/g1${STYLE}.jpg" && exit 1
|
[[ ! -f ${MY_PATH}/images/g1${STYLE}.png ]] && echo "AJOUTER : ./images/g1${STYLE}.jpg" && exit 1
|
||||||
[[ ! -f ${MY_PATH}/images/fond${STYLE}.jpg ]] && echo "STYLE INCONNU ? ./images/fond${STYLE}.jpg" && exit 1
|
[[ ! -f ${MY_PATH}/images/fond${STYLE}.jpg ]] && echo "STYLE INCONNU ? ./images/fond${STYLE}.jpg" && exit 1
|
||||||
[[ ! -f ${MY_PATH}/images/logo${STYLE}.png ]] && echo "AJOUTER : ./images/logo${STYLE}.jpg" && exit 1
|
[[ ! -f ${MY_PATH}/images/logo${STYLE}.png ]] && echo "AJOUTER : ./images/logo${STYLE}.jpg" && exit 1
|
||||||
|
|
||||||
UNIQID=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
|
UNIQID=$(echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}" | tail -c-7)
|
||||||
|
|
||||||
# CREATION DE $NBbillets BILLETS DE $MONTANT DU
|
# CREATION DE $NBbillets BILLETS DE $MONTANT DU
|
||||||
boucle=0;
|
boucle=0;
|
||||||
while [ $boucle -lt $NBbillets ]
|
while [ $boucle -lt $NBbillets ]
|
||||||
do
|
do
|
||||||
boucle=$((boucle+1))
|
boucle=$((boucle+1))
|
||||||
mkdir -p "${MY_PATH}/tmp/g1billet/${UNIQID}"
|
mkdir -p "${MY_PATH}/tmp/g1billet/${UNIQID}"
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ do
|
|||||||
# CREATION FICHIER IMAGE BILLET dans ${MY_PATH}/tmp/g1billet/${UNIQID}
|
# CREATION FICHIER IMAGE BILLET dans ${MY_PATH}/tmp/g1billet/${UNIQID}
|
||||||
${MY_PATH}/MAKE_G1BILLET.sh "${SALT}" "${SECRET}" "${MONTANT}" "${BILLETPUBKEY}" "${UNIQID}" "${STYLE}" "${ASTRONAUTENS}" "${EMAIL}"
|
${MY_PATH}/MAKE_G1BILLET.sh "${SALT}" "${SECRET}" "${MONTANT}" "${BILLETPUBKEY}" "${UNIQID}" "${STYLE}" "${ASTRONAUTENS}" "${EMAIL}"
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${NBbillets} == 1 ]]
|
if [[ ${NBbillets} == 1 ]]
|
||||||
then
|
then
|
||||||
|
|
||||||
# ONE FILE ONLY
|
# ONE FILE ONLY
|
||||||
cp ${MY_PATH}/tmp/g1billet/${UNIQID}/*.jpg ${MY_PATH}/tmp/g1billet/${UNIQID}.jpg
|
cp ${MY_PATH}/tmp/g1billet/${UNIQID}/*.jpg ${MY_PATH}/tmp/g1billet/${UNIQID}.jpg
|
||||||
@ -89,7 +89,7 @@ then
|
|||||||
chmod 777 ${MY_PATH}/tmp/g1billet/${UNIQID}.jpg
|
chmod 777 ${MY_PATH}/tmp/g1billet/${UNIQID}.jpg
|
||||||
export ZFILE="${MY_PATH}/tmp/g1billet/${UNIQID}.jpg"
|
export ZFILE="${MY_PATH}/tmp/g1billet/${UNIQID}.jpg"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# MONTAGE DES IMAGES DES BILLETS VERS ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
# MONTAGE DES IMAGES DES BILLETS VERS ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
||||||
montage ${MY_PATH}/tmp/g1billet/${UNIQID}/*.jpg -tile 2x3 -geometry 964x459 ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
montage ${MY_PATH}/tmp/g1billet/${UNIQID}/*.jpg -tile 2x3 -geometry 964x459 ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
||||||
@ -102,10 +102,10 @@ else
|
|||||||
chmod 777 ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
chmod 777 ${MY_PATH}/tmp/g1billet/${UNIQID}.pdf
|
||||||
export ZFILE="${MY_PATH}/tmp/g1billet/${UNIQID}.pdf"
|
export ZFILE="${MY_PATH}/tmp/g1billet/${UNIQID}.pdf"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## ASTRO : FIND TW ADDRESS + EMAIL = CREATE PLAYER on 1234 API
|
## ASTRO : FIND TW ADDRESS + EMAIL = CREATE PLAYER on 1234 API
|
||||||
|
|
||||||
if [[ ${EMAIL} ]]; then
|
if [[ ${EMAIL} ]]; then
|
||||||
@ -116,34 +116,34 @@ fi
|
|||||||
# && curl -s 'https://astroport.copylaradio.com/?salt='$UN'&pepper='$DE'&g1pub=on&email='$EMAIL
|
# && curl -s 'https://astroport.copylaradio.com/?salt='$UN'&pepper='$DE'&g1pub=on&email='$EMAIL
|
||||||
|
|
||||||
fi
|
fi
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open "$ZFILE"
|
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open "$ZFILE"
|
||||||
|
|
||||||
echo "$ZFILE" # IMPORTANT ## LAST LINE : INFORM DAEMON
|
echo "$ZFILE" # IMPORTANT ## LAST LINE : INFORM DAEMON
|
||||||
|
|
||||||
else
|
else
|
||||||
################################################################################
|
################################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
## MAKE IT A NETWORK MICRO SERVICE -- PORTS : INPUT=33101 OUTPUT=33102
|
## MAKE IT A NETWORK MICRO SERVICE -- PORTS : INPUT=33101 OUTPUT=33102
|
||||||
############## CLEAN START DAEMON 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=$(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 && exit 1
|
[[ $pidportinuse ]] && echo "KILLING OLD DEAMON 33101 $pidportinuse" && kill -9 $pidportinuse && killall G1BILLETS.sh && exit 1
|
||||||
|
|
||||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
||||||
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse"
|
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse"
|
||||||
#####################################################################
|
#####################################################################
|
||||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||||
isLAN=$(route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
isLAN=$(route -n |awk '$1 == "0.0.0.0" {print $2}' | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||||
|
|
||||||
if [[ $isLAN ]]; then
|
if [[ $isLAN ]]; then
|
||||||
HNAME="http://g1billet.localhost"
|
HNAME="http://g1billet.localhost"
|
||||||
else
|
else
|
||||||
HNAME="http://$(hostname -I | awk '{print $1}' | head -n 1)"
|
HNAME="http://$(hostname -I | awk '{print $1}' | head -n 1)"
|
||||||
fi
|
fi
|
||||||
RNAME="$HNAME:33102"
|
RNAME="$HNAME:33102"
|
||||||
|
|
||||||
HTTPWELLCOME='HTTP/1.1 200 OK
|
HTTPWELLCOME='HTTP/1.1 200 OK
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Access-Control-Allow-Credentials: true
|
Access-Control-Allow-Credentials: true
|
||||||
Access-Control-Allow-Methods: GET
|
Access-Control-Allow-Methods: GET
|
||||||
@ -152,6 +152,7 @@ Content-Type: text/html; charset=UTF-8
|
|||||||
|
|
||||||
<!DOCTYPE html><html>
|
<!DOCTYPE html><html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>[G1BILLET] HTTP MICRO SERVICE - 33101 - 33102 -</title>
|
<title>[G1BILLET] HTTP MICRO SERVICE - 33101 - 33102 -</title>
|
||||||
<meta http-equiv="refresh" content="30; url='$RNAME'" />
|
<meta http-equiv="refresh" content="30; url='$RNAME'" />
|
||||||
<style>
|
<style>
|
||||||
@ -178,6 +179,7 @@ function countdown() {
|
|||||||
</script>
|
</script>
|
||||||
<form method="get">
|
<form method="get">
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<label for="montant">Montant :</label>
|
<label for="montant">Montant :</label>
|
||||||
<select name="montant">
|
<select name="montant">
|
||||||
<option value="0">?</option>
|
<option value="0">?</option>
|
||||||
@ -189,17 +191,29 @@ function countdown() {
|
|||||||
<option value="50">50</option>
|
<option value="50">50</option>
|
||||||
<option value="100">100</option>
|
<option value="100">100</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="type">Type :</label>
|
<label for="type">Type :</label>
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option value="">Planche de G1BILLETS</option>
|
<option value="">Planche de G1BILLETS</option>
|
||||||
<option value="xbian">G1PASS</option>
|
<option value="xbian">G1PASS</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
|
||||||
|
<label for="dice">Securite :</label>
|
||||||
|
<select name="dice">
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3" selected>3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="6">6</option>
|
||||||
|
<option value="7">7</option>
|
||||||
|
</select>
|
||||||
|
<br> <br>
|
||||||
<button type="submit">Lancer Fabrication</button>
|
<button type="submit">Lancer Fabrication</button>
|
||||||
</form>
|
</form>
|
||||||
</body></html>'
|
</body></html>'
|
||||||
|
|
||||||
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||||
|
|
||||||
#### LOG REDIRECTION
|
#### LOG REDIRECTION
|
||||||
echo "=================================================="
|
echo "=================================================="
|
||||||
@ -212,15 +226,13 @@ function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
|||||||
mkdir -p ${MY_PATH}/tmp
|
mkdir -p ${MY_PATH}/tmp
|
||||||
exec 2>&1 >> ${MY_PATH}/tmp/G1BILLETS.log
|
exec 2>&1 >> ${MY_PATH}/tmp/G1BILLETS.log
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
########### daemon loop
|
########### daemon loop
|
||||||
#####################################################################
|
#####################################################################
|
||||||
while true; do
|
while true; do
|
||||||
echo "=================================================="
|
echo "=================================================="
|
||||||
echo "$ME DAEMON READY $(date)"
|
echo "$ME DAEMON READY $(date)"
|
||||||
echo "=================================================="
|
echo "=================================================="
|
||||||
echo "LOG : ON"
|
|
||||||
echo "=================================================="
|
|
||||||
REQ=$(echo "$HTTPWELLCOME" | nc -l -p 33101 -q 1) ## # WAIT FOR 33101 PORT CONTACT
|
REQ=$(echo "$HTTPWELLCOME" | nc -l -p 33101 -q 1) ## # WAIT FOR 33101 PORT CONTACT
|
||||||
|
|
||||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||||
@ -231,19 +243,24 @@ while true; do
|
|||||||
|
|
||||||
echo "=================================================="
|
echo "=================================================="
|
||||||
echo "$MOATS" $(date)
|
echo "$MOATS" $(date)
|
||||||
echo "=================================================="
|
echo "=========== %%%%%%%%%%%%%%% =============="
|
||||||
echo "$REQ"
|
echo "$REQ"
|
||||||
echo "=================================================="
|
echo "=========== %%%%%%%%%%%%%%% =============="
|
||||||
echo "$URL"
|
echo "$URL"
|
||||||
|
echo "=================================================="
|
||||||
|
|
||||||
|
## DECODING RECEIVED URL
|
||||||
arr=(${URL//[=&]/ })
|
arr=(${URL//[=&]/ })
|
||||||
# PARAM (x 3) EXTRACT "¶m=value"
|
# PARAM (x 3) EXTRACT "¶m=value"
|
||||||
ONE=$(urldecode ${arr[0]} | xargs); TWO=$(urldecode ${arr[2]} | xargs);
|
ONE=$(urldecode ${arr[0]} | xargs); TWO=$(urldecode ${arr[2]} | xargs); X=$(urldecode ${arr[4]} | xargs);
|
||||||
MONTANT=$(urldecode ${arr[1]} | xargs); STYLE=$(urldecode ${arr[3]} | xargs);
|
MONTANT=$(urldecode ${arr[1]} | xargs); STYLE=$(urldecode ${arr[3]} | xargs); XPARM=$(urldecode ${arr[5]} | xargs);
|
||||||
# echo "DECODED : $ONE=$MONTANT & $TWO=$STYLE"
|
echo "DECODED : $ONE=$MONTANT & $TWO=$STYLE & $X=$XPARM"
|
||||||
|
|
||||||
#####################################################################
|
[[ $STYLE == "dice" ]] && STYLE=""
|
||||||
echo ${MY_PATH}/${ME} '"'$MONTANT'"' '"'$STYLE'"'
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
echo ${MY_PATH}/${ME} '"'$MONTANT'"' '"'$STYLE'"' '"'$XPARM'"'
|
||||||
|
#####################################################################
|
||||||
# EXECUTE COMMAND
|
# EXECUTE COMMAND
|
||||||
LOG=$(${MY_PATH}/${ME} "$MONTANT" "$STYLE")
|
LOG=$(${MY_PATH}/${ME} "$MONTANT" "$STYLE")
|
||||||
|
|
||||||
@ -257,17 +274,17 @@ while true; do
|
|||||||
ZFILE=$(echo "$LOG" | tail -n 1) ### LAST LINE : INFORM DAEMON
|
ZFILE=$(echo "$LOG" | tail -n 1) ### LAST LINE : INFORM DAEMON
|
||||||
echo $ZFILE
|
echo $ZFILE
|
||||||
|
|
||||||
# PREPARE FILE SENDING
|
# PREPARE FILE SENDING
|
||||||
FILE_NAME="$(basename "${ZFILE}")"
|
FILE_NAME="$(basename "${ZFILE}")"
|
||||||
EXT="${FILE_NAME##*.}"
|
EXT="${FILE_NAME##*.}"
|
||||||
BSIZE=$(du -b "${ZFILE}" | awk '{print $1}' | tail -n 1)
|
BSIZE=$(du -b "${ZFILE}" | awk '{print $1}' | tail -n 1)
|
||||||
|
|
||||||
# KILL OLD 33102 - USE IT IF YOU ( publishing )&
|
# KILL OLD 33102 - USE IT IF YOU ( publishing )&
|
||||||
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
pidportinuse=$(ps axf --sort=+utime | grep -w "nc -l -p 33102" | grep -v -E 'color=auto|grep' | awk '{gsub(/^ +| +$/,"")} {print $0}' | tail -n 1 | cut -d " " -f 1)
|
||||||
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse"
|
[[ $pidportinuse ]] && kill -9 $pidportinuse && echo "KILLING NOT COLLECTED THREAD $pidportinuse"
|
||||||
|
|
||||||
# HTTP/1.1 200 OK
|
# HTTP/1.1 200 OK
|
||||||
echo 'HTTP/1.1 200 OK
|
echo 'HTTP/1.1 200 OK
|
||||||
Access-Control-Allow-Origin: *
|
Access-Control-Allow-Origin: *
|
||||||
Access-Control-Allow-Credentials: true
|
Access-Control-Allow-Credentials: true
|
||||||
Access-Control-Allow-Methods: GET
|
Access-Control-Allow-Methods: GET
|
||||||
@ -278,28 +295,30 @@ Content-Length:'${BSIZE}'
|
|||||||
Content-Disposition: attachment; filename='${FILE_NAME}'
|
Content-Disposition: attachment; filename='${FILE_NAME}'
|
||||||
' > ${MY_PATH}/tmp/http.${MOATS}
|
' > ${MY_PATH}/tmp/http.${MOATS}
|
||||||
|
|
||||||
cat ${ZFILE} >> ${MY_PATH}/tmp/http.${MOATS}
|
cat ${ZFILE} >> ${MY_PATH}/tmp/http.${MOATS}
|
||||||
|
|
||||||
# NETCAT PUBLISH port=33102
|
# NETCAT PUBLISH port=33102
|
||||||
echo "PUBLISHING ${MOATS} : $RNAME"
|
echo "PUBLISHING ${MOATS} : $RNAME"
|
||||||
|
|
||||||
if [[ $XDG_SESSION_TYPE != 'x11' ]]; then
|
if [[ $XDG_SESSION_TYPE != 'x11' ]]; then
|
||||||
(
|
(
|
||||||
cat ${MY_PATH}/tmp/http.${MOATS} | nc -l -p 33102 -q 1 > /dev/null 2>&1 \
|
cat ${MY_PATH}/tmp/http.${MOATS} | nc -l -p 33102 -q 1 > /dev/null 2>&1 \
|
||||||
&& rm -f "${MY_PATH}/tmp/http.${MOATS}" \
|
&& rm -f "${MY_PATH}/tmp/http.${MOATS}" \
|
||||||
&& rm -f "${ZFILE}" \
|
&& rm -f "${ZFILE}" \
|
||||||
|
&& rm -Rf "${ZFILE%.*}" \
|
||||||
&& echo "G1BILLETS FILE CONSUMED"
|
&& echo "G1BILLETS FILE CONSUMED"
|
||||||
) &
|
) &
|
||||||
else
|
else
|
||||||
rm -f "${MY_PATH}/tmp/http.${MOATS}" \
|
rm -f "${MY_PATH}/tmp/http.${MOATS}" \
|
||||||
&& rm -f "${ZFILE}" \
|
&& rm -f "${ZFILE}" \
|
||||||
|
&& rm -Rf "${ZFILE%.*}" \
|
||||||
&& echo "G1BILLETS FILE CONSUMED"
|
&& echo "G1BILLETS FILE CONSUMED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
#####################################################################
|
#####################################################################
|
||||||
## loop ###############################################################
|
## loop ###############################################################TITLE="${file%.*}"
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user