Subversion Repositories ALCASAR

Rev

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

Rev 2601 Rev 2631
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-sms.sh 2601 2018-08-19 23:58:27Z tom.houdayer $
2
# $Id: alcasar-sms.sh 2631 2018-09-12 21:16:42Z rexy $
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 164... Line 164...
164
		mysql --user=$u_db --password=$p_db -B -se "$sql_remove_ban_perm WHERE SenderNumber=$1;"
164
		mysql --user=$u_db --password=$p_db -B -se "$sql_remove_ban_perm WHERE SenderNumber=$1;"
165
} # end function add_num_perm()
165
} # end function add_num_perm()
166
 
166
 
167
function new_sms() {
167
function new_sms() {
168
	# Check Inbox table, manage Ban temp and perm, create account
168
	# Check Inbox table, manage Ban temp and perm, create account
169
		export salt='$1$passwd$'
169
		export salt='$5$passwd$'
170
 
170
 
171
		sql_select_inbox="connect gammu; SELECT ID, SenderNumber, TextDecoded FROM $inb;"
171
		sql_select_inbox="connect gammu; SELECT ID, SenderNumber, TextDecoded FROM $inb;"
172
		sql_delete_inbox="connect gammu; DELETE FROM $inb"
172
		sql_delete_inbox="connect gammu; DELETE FROM $inb"
173
 
173
 
174
		mysql --user=$u_db --password=$p_db -B -se "$sql_select_inbox" | while read result;
174
		mysql --user=$u_db --password=$p_db -B -se "$sql_select_inbox" | while read result;