Subversion Repositories ALCASAR

Rev

Rev 2262 | Rev 2454 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2262 Rev 2294
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-sms.sh 2262 2017-05-29 20:19:03Z tom.houdayer $
2
# $Id: alcasar-sms.sh 2294 2017-06-20 16:45:48Z richard $
3
 
3
 
4
# alcasar-sms.sh
4
# alcasar-sms.sh
5
# by Nicolas Aubry & Rexy
5
# by Nicolas Aubry & Rexy
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 55... Line 55...
55
function mode_huawei() {
55
function mode_huawei() {
56
	couple=$(lsusb | grep -i huawei | cut -d ' ' -f6)
56
	couple=$(lsusb | grep -i huawei | cut -d ' ' -f6)
57
	vendor=$(echo $couple | cut -d ':' -f1)
57
	vendor=$(echo $couple | cut -d ':' -f1)
58
	product=$(echo $couple | cut -d ':' -f2)
58
	product=$(echo $couple | cut -d ':' -f2)
59
 
59
 
60
	echo "*********************" >> /srv/log.log
60
	echo "******** Modeswitch *************" >> $logfile
61
	echo $vendor >> /srv/log.log
61
	echo $vendor >> $logfile
62
	echo $product >> /srv/log.log
62
	echo $product >> $logfile
63
 
63
 
64
	/usr/sbin/usb_modeswitch -I -H -v 0x$vendor -p 0x$product -V 0x$vendor -P 0x$product -W -n >> /srv/log.log
64
	/usr/sbin/usb_modeswitch -I -H -v 0x$vendor -p 0x$product -V 0x$vendor -P 0x$product -W -n >> $logfile
65
}
65
}
66
 
66
 
67
function start_gammu() {
67
function start_gammu() {
68
	#On truncate la table phones (informations signal / IMEI / batterie / sms recu et envoyé)
68
	#On truncate la table phones (informations signal / IMEI / batterie / sms recu et envoyé)
69
		sql_trunc_phones="connect gammu; TRUNCATE phones;"
69
		sql_trunc_phones="connect gammu; TRUNCATE phones;"