forked from qo-op/G1BILLET
jeu
This commit is contained in:
parent
3a1ab3a45e
commit
732c741ac5
19
G1BILLETS.sh
19
G1BILLETS.sh
@ -32,7 +32,7 @@ STYLE="$2"
|
|||||||
|
|
||||||
## PLANCHE PDF DE 6 BILLETS PAR DEFAUT
|
## PLANCHE PDF DE 6 BILLETS PAR DEFAUT
|
||||||
NBbillets=6
|
NBbillets=6
|
||||||
[[ "${STYLE}" != "" && "${STYLE}" != "solian" ]] && NBbillets=1
|
[[ "${STYLE}" != "" && "${STYLE}" != "solian" && "${STYLE}" != "jeu" ]] && NBbillets=1
|
||||||
|
|
||||||
echo "CREATION $NBbillets x G1BILLET - $STYLE -"
|
echo "CREATION $NBbillets x G1BILLET - $STYLE -"
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ do
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "${STYLE}" != "" && "${STYLE}" != "solian" ]]
|
if [[ ${NBbillets} == 1 ]]
|
||||||
then
|
then
|
||||||
|
|
||||||
# ONE FILE ONLY
|
# ONE FILE ONLY
|
||||||
@ -110,12 +110,11 @@ fi
|
|||||||
|
|
||||||
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open "$ZFILE"
|
[[ $XDG_SESSION_TYPE == 'x11' ]] && xdg-open "$ZFILE"
|
||||||
|
|
||||||
echo "$ZFILE" ### 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)
|
||||||
@ -144,7 +143,7 @@ Content-Type: text/html; charset=UTF-8
|
|||||||
<!DOCTYPE html><html>
|
<!DOCTYPE html><html>
|
||||||
<head>
|
<head>
|
||||||
<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="20; url='$RNAME'" />
|
||||||
<style>
|
<style>
|
||||||
#countdown { display: flex; justify-content: center; align-items: center; color: #0e2c4c; font-size: 20px; width: 60px; height: 60px; background-color: #e7d9fc; border-radius: 50%;}
|
#countdown { display: flex; justify-content: center; align-items: center; color: #0e2c4c; font-size: 20px; width: 60px; height: 60px; background-color: #e7d9fc; border-radius: 50%;}
|
||||||
</style>
|
</style>
|
||||||
@ -153,7 +152,7 @@ Content-Type: text/html; charset=UTF-8
|
|||||||
<center><h1><a href="'$RNAME'">(♥‿‿♥)</a>.</h1></center>
|
<center><h1><a href="'$RNAME'">(♥‿‿♥)</a>.</h1></center>
|
||||||
<center><div id="countdown"></div></center>
|
<center><div id="countdown"></div></center>
|
||||||
<script>
|
<script>
|
||||||
var timeLeft = 30;
|
var timeLeft = 20;
|
||||||
var elem = document.getElementById("countdown");
|
var elem = document.getElementById("countdown");
|
||||||
var timerId = setInterval(countdown, 1000);
|
var timerId = setInterval(countdown, 1000);
|
||||||
|
|
||||||
@ -182,6 +181,7 @@ 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
|
||||||
while true; do
|
while true; do
|
||||||
echo "=================================================="
|
echo "=================================================="
|
||||||
echo "$ME DAEMON READY"
|
echo "$ME DAEMON READY"
|
||||||
@ -247,13 +247,18 @@ 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
|
||||||
(
|
(
|
||||||
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}" \
|
||||||
&& echo "G1BILLETS FILE CONSUMED"
|
&& echo "G1BILLETS FILE CONSUMED"
|
||||||
) &
|
) &
|
||||||
|
else
|
||||||
|
rm -f "${MY_PATH}/tmp/http.${MOATS}" \
|
||||||
|
&& rm -f "${ZFILE}" \
|
||||||
|
&& echo "G1BILLETS FILE CONSUMED"
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ esac
|
|||||||
composite -compose Over -gravity SouthWest -geometry +50+50 -dissolve 70% "${MY_PATH}/images/logo${STYLE}.png" "${MY_PATH}/images/fond${STYLE}.jpg" "${MY_PATH}/tmp/${BILLETNAME}.jpg"
|
composite -compose Over -gravity SouthWest -geometry +50+50 -dissolve 70% "${MY_PATH}/images/logo${STYLE}.png" "${MY_PATH}/images/fond${STYLE}.jpg" "${MY_PATH}/tmp/${BILLETNAME}.jpg"
|
||||||
|
|
||||||
# xbian style (ASTROPORT/KODI) + JEU
|
# xbian style (ASTROPORT/KODI) + JEU
|
||||||
if [[ "${STYLE}" == "xbian" || "${STYLE}" == "astro" ]]
|
if [[ "${STYLE}" == "xbian" || "${STYLE}" == "jeu" || "${STYLE}" == "astro" ]]
|
||||||
then
|
then
|
||||||
|
|
||||||
if [[ $ASTRONAUTENS ]]; then
|
if [[ $ASTRONAUTENS ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user