16,7 → 16,7 |
######################################### |
####### IDs DB ########################## |
u_db="radius" |
p_db="password" |
p_db="rectAE3BAWRJqQo7" |
######################################### |
######################################### |
|
32,6 → 32,7 |
SMS_c="SMS_country" |
|
config="/etc/gammu_smsd_conf" |
config2="/etc/gammurc" |
logfile="/var/log/gammu-smsd/gammu-smsd.log" |
script="/usr/local/bin/alcasar-sms.sh" |
public_page="/var/www/html/autoregistrationinfo.php" |
404,19 → 405,31 |
# cat $config | grep logfile | cut -d ' ' -f3 |
# exit 0 |
# ;; |
--connect) |
# Récupère la vitesse de co |
cat $config | grep connection | cut -d ' ' -f3 |
--speed) |
# Get connection speed |
cat $config | grep ^connection | cut -d ' ' -f3 |
exit 0 |
;; |
--replace_connect) |
# Edition de la vitesse de co |
--replace_speed) |
# write the connection speed |
sed -i "s/^connection = at.*/connection = at$2/g" $config |
sed -i "s/^connection = at.*/connection = at$2/g" $config2 |
exit 0 |
;; |
--port) |
# Get connection speed |
cat $config | grep ^port | cut -d ' ' -f3 |
exit 0 |
;; |
--replace_port) |
# write the connection speed |
sed -i "s?^port =.*?port = $2?g" $config |
sed -i "s?^device = .*?device = $2?g" $config2 |
exit 0 |
;; |
--pin) |
# Récupère le code PIN (file de conf) |
cat $config | grep PIN | cut -d ' ' -f3 |
cat $config | grep ^PIN | cut -d ' ' -f3 |
exit 0 |
;; |
--replace_pin) |