printQR_oasis_MODEL.sh

This commit is contained in:
qo-op 2021-06-23 01:58:18 +02:00
parent 7f5883917d
commit 784ddf3cba
15 changed files with 36 additions and 14 deletions

View File

@ -9,4 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
echo "EXECUTE $ME ($1, $2)"
echo "Expédition SMS bio-dynamie.org (cron daily)"
echo "Expédition SMS aux GROUPES et PHONE"
# SEARCH FOR /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh

9
printQR_oasis_MODEL.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
MODEL="$1"
[[ ! $MODEL ]] && MODEL = "MIZ"
brother_ql_create --model QL-700 ${MY_PATH}/img/QR_oasis_${MODEL}.png --label-size 62 > /tmp/QR_oasis_${MODEL}.bin
brother_ql_print /tmp/QR_oasis_${MODEL}.bin /dev/usb/lp0

View File

@ -1,5 +0,0 @@
#!/bin/bash
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
brother_ql_create --model QL-700 ${MY_PATH}/img/QR_oasis_saubole.png --label-size 62 > /tmp/QR_oasis_saubole.bin
brother_ql_print /tmp/QR_oasis_saubole.bin /dev/usb/lp0

View File

@ -93,7 +93,7 @@ if [[ ! $xzuid ]]; then
########################################################################
echo "## REGISTER Nextcloud : ${xzuid} / ${phone} "
########################################################################
sudo su -s /bin/sh www-data -c "export OC_PASS=\"${phone}\" && php /var/www/nextcloud/occ user:add --password-from-env --group=\"saubole\" --display-name=\"${xzuid}\" ${xzuid}"
sudo su -s /bin/sh www-data -c "export OC_PASS=\"${phone}\" && php /var/www/nextcloud/occ user:add --password-from-env --group=\"${groupe}\" --display-name=\"${xzuid}\" ${xzuid}"
fi
########################################################################
@ -115,19 +115,23 @@ else
fi
########################################################################
echo "## GESTION MESSAGE VERS ${groupe}"
echo "## GESTION MESSAGE PHONE VERS GUILDE : ${groupe}"
########################################################################
mkdir -p /home/${YOU}/.zen/SMS/SAUBOLE/${groupe}
## WRITE AVIS FOR GROUPE
echo "${phone};${avis}" >> /home/${YOU}/.zen/SMS/SAUBOLE/${groupe}/AVIS
mkdir -p /home/${YOU}/.zen/SMS/GUILDES/${groupe}/INPUT/
## Ajout à la liste "avis" de PHONE à la GUILDE
echo "${avis}" >> /home/${YOU}/.zen/SMS/GUILDES/${groupe}/INPUT/${phone}
## Ajout à la liste "guildes" de PHONE
echo "${groupe}" >> /home/${YOU}/.zen/SMS/PHONE/${phonehash}/guildes
########################################################################
## gammu-smsd HACK (must be stop to send response sms)
## BUG: gammu-smsd HACK (must be stop to send response sms)
## Création de script d'envoi de SMS après gammu-smsd stop
########################################################################
ts=$(date -u +%s%N | cut -b1-13)
echo "#!/bin/bash
sudo gammu sendsms TEXT \"$phone\" -text \"Message pour ${groupe} bien reçu.\"" >> /home/${YOU}/.zen/SMS/${ts}.tosend.sh
chmod 775 /home/${YOU}/.zen/SMS/${ts}.tosend.sh
sudo gammu sendsms TEXT \"$phone\" -text \"Message pour ${groupe} bien reçu.\"" > /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh
chmod 775 /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh
########################################################################
## PRINT ID + MESSAGE

BIN
sms/QR_oasis_ARTISTES.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
sms/QR_oasis_BACHET.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
sms/QR_oasis_CIRQUE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
sms/QR_oasis_DOUMCELLO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
sms/QR_oasis_HELENE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
sms/QR_oasis_MIZ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
sms/QR_oasis_ODETTE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
sms/QR_oasis_SAUBOLE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
sms/QR_oasis_TREAPHOP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
sms/QR_oasis_WAAWACH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

11
sms/prepare_sms_tosend.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# CREATE PHONE TOSEND MESSAGE
phone="$1"
phonehash=$(echo $phone | sha256sum | cut -d ' ' -f1)
message="$2"
groupe="$3"
ts=$(date -u +%s%N | cut -b1-13)
echo "#!/bin/bash
sudo gammu sendsms TEXT \"${phone}\" -text \"${message}\"" > /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh
chmod 775 /home/${YOU}/.zen/SMS/PHONE/${phonehash}/${ts}.tosend.sh