#!/bin/sh # smscon script (v0.8.1) # (edit below) if dpkg -l | grep smssend 1>/dev/null; then ##Read SENDERNUMBER from config file SENDERNUMBER=`awk -F' ' '$1 == "SENDERNUMBER" { print $3;exit}' /opt/smscon/smscon_config|cut -d"'" -f2` ##Send SMS if smssend package is installed # get cellid codes via dbus command # MCC: Mobile Country Code; MNC: Mobile Network Code; # LAC: Local Area Code; CELLID: Cellid; EXPRESSION=`dbus-send --system --print-reply=literal --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status` MCC=`echo $EXPRESSION | cut -f 10 -d " "` MNC=`echo $EXPRESSION | cut -f 8 -d " "` LAC=`echo $EXPRESSION | cut -f 4 -d " "` CELLID=`echo $EXPRESSION | cut -f 6 -d " "` #echo $MCC $MNC $LAC $CELLID smssend -n $SENDERNUMBER -m "Cellid Info: MCC=$MCC; MNC=$MNC; LAC=$LAC; CELLID=$CELLID" fi