From 2b4ce17b3ce6bb7c0e40eb9eefdcd4daf1ce6db3 Mon Sep 17 00:00:00 2001 From: Fred Date: Tue, 20 Nov 2018 22:39:42 +0000 Subject: [PATCH] Delete sms_COUNT.sh~ --- shell/sms_COUNT.sh~ | 51 --------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100755 shell/sms_COUNT.sh~ diff --git a/shell/sms_COUNT.sh~ b/shell/sms_COUNT.sh~ deleted file mode 100755 index 3466505..0000000 --- a/shell/sms_COUNT.sh~ +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -################################################################################ -# Author: Fred (support@qo-op.com) -# Version: 0.1 -# License: GPL (http://www.google.com/search?q=GPL) -################################################################################ -source /root/G1SMS/shell/init.sh -source /root/G1SMS/shell/functions.sh -log "sms_COUNT.sh ($1=phone $2=NOSMS)" -PHONE=$1 - -# Initialise PHONE, PIN, PUBKEY, UNIT, HIST -sms_INIT_ACCOUNT "$PHONE" "NOSMS" -if [[ $UNKNOWN == "unknown" ]]; then - sms_ERROR "$PHONE" "Porte-monnaie inconnu. Envoyez N pour le créer." - exit -fi - -# Check account amount -AMOUNTG1=$(./silkaj/silkaj amount --auth-scrypt -salt="$PHONE" -password="$PIN") -AMOUNTDU=$(bc <<< "scale=2; $AMOUNTG1 / $DUFACTOR") -AMOUNTLOVE=$(bc <<< "$AMOUNTG1 * 100 / $DUFACTOR") - -case "$UNIT" in - G1) - AMOUNT=$AMOUNTG1 - ;; - DU) - AMOUNT=$AMOUNTDU - ;; - *) - AMOUNT=$AMOUNTLOVE - ;; -esac - -# LOG -log "Solde = $AMOUNT ($UNIT)" - -# If script control only run: NOSMS -if [ "$2" != "NOSMS" ]; then - mess="[G1SMS] -Compte: $PHONE -Solde: $AMOUNT $UNIT -" - # Send response SMS - sms_SEND "$PHONE" "$mess" -else - echo $AMOUNTG1 -fi - -exit -- 2.22.0