Changeset 37181


Ignore:
Timestamp:
02/18/16 13:00:46 (8 years ago)
Author:
karlo
Message:

fix callmon (50)

Location:
ipk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.mipsel/tools_callmonitor/_path_/usr/local/share/titan/plugins/callmonitor1/fritzbox_msg_new.sh

    r37173 r37181  
    147147   echo "$NUMMER"
    148148   echo "Searching for $NUMMER in cache file..."
    149    if [ ! -f $FRITZCACHE ]; then  touch $FRITZCACHE; fi
    150     #try to get caller-id via $NUMBER from $FRITZCACHE
    151     NAME=`grep $NUMMER $FRITZCACHE | sed -e "s@$NUMMER\#@@" -e "s@;@\n@g"`
     149   if [ ! -f $FRITZBUCH ]; then  touch $FRITZBUCH; fi
     150    #try to get caller-id via $NUMBER from $FRITZBUCH
     151    NAME=`grep $NUMMER $FRITZBUCH | sed -e "s@$NUMMER\#@@" -e "s@;@\n@g"`
    152152    ADDRESSE=`echo $NAME | sed -e 's/.*->//g'`
    153153    NAME=`echo $NAME | sed -e 's/->.*//g'`
     
    319319                                                        name=`echo $line | cut -d'<' -f2 | sed s/"title="//g`
    320320                                                        nummer1=`echo $line | cut -d'<' -f7 | sed s/" "//g`
    321                                                         help=`echo $line | cut -d'<' -f8`
     321                                                        help=`echo $line | cut -d'<' -f8 | cut -c 1-2`
    322322                                                        if [ $help = "br" ]; then
    323323                                                                nummer2=`echo $line | cut -d'<' -f9 | sed s/" "//g`
    324324                                                                pos1=13
    325325                                                                pos2=15
    326                                                                 help=`echo $line | cut -d'<' -f10`
     326                                                                help=`echo $line | cut -d'<' -f10 | cut -c 1-2`
    327327                                                                if [ $help = "br" ]; then
    328328                                                                        nummer3=`echo $line | cut -d'<' -f11 | sed s/" "//g`
     
    330330                                                                        pos2=17
    331331                                                                        pos3=19
    332                                                                         help=`echo $line | cut -d'<' -f12`
     332                                                                        help=`echo $line | cut -d'<' -f12 | cut -c 1-2`
    333333                                                                        if [ $help = "br" ]; then
    334334                                                                                nummer4=`echo $line | cut -d'<' -f13 | sed s/" "//g`
     
    358358                                                fi
    359359                                        done < /tmp/curlhelp3.tmp
     360                                        rm /tmp/curlhelp3.tmp
    360361                               
    361362                        else
     
    470471                                                fi
    471472                                        done < /tmp/curlhelp6.tmp
    472                                 cp $FRITZBUCH $FRITZCACHE       
    473                         fi             
     473                                        rm /tmp/curlhelp6.tmp                                   
     474                        fi
     475                        #cp $FRITZBUCH $FRITZCACHE
    474476                fi
    475477        fi     
  • ipk/source.sh4/tools_callmonitor/_path_/usr/local/share/titan/plugins/callmonitor1/fritzbox_msg_new.sh

    r37173 r37181  
    147147   echo "$NUMMER"
    148148   echo "Searching for $NUMMER in cache file..."
    149    if [ ! -f $FRITZCACHE ]; then  touch $FRITZCACHE; fi
    150     #try to get caller-id via $NUMBER from $FRITZCACHE
    151     NAME=`grep $NUMMER $FRITZCACHE | sed -e "s@$NUMMER\#@@" -e "s@;@\n@g"`
     149   if [ ! -f $FRITZBUCH ]; then  touch $FRITZBUCH; fi
     150    #try to get caller-id via $NUMBER from $FRITZBUCH
     151    NAME=`grep $NUMMER $FRITZBUCH | sed -e "s@$NUMMER\#@@" -e "s@;@\n@g"`
    152152    ADDRESSE=`echo $NAME | sed -e 's/.*->//g'`
    153153    NAME=`echo $NAME | sed -e 's/->.*//g'`
     
    319319                                                        name=`echo $line | cut -d'<' -f2 | sed s/"title="//g`
    320320                                                        nummer1=`echo $line | cut -d'<' -f7 | sed s/" "//g`
    321                                                         help=`echo $line | cut -d'<' -f8`
     321                                                        help=`echo $line | cut -d'<' -f8 | cut -c 1-2`
    322322                                                        if [ $help = "br" ]; then
    323323                                                                nummer2=`echo $line | cut -d'<' -f9 | sed s/" "//g`
    324324                                                                pos1=13
    325325                                                                pos2=15
    326                                                                 help=`echo $line | cut -d'<' -f10`
     326                                                                help=`echo $line | cut -d'<' -f10 | cut -c 1-2`
    327327                                                                if [ $help = "br" ]; then
    328328                                                                        nummer3=`echo $line | cut -d'<' -f11 | sed s/" "//g`
     
    330330                                                                        pos2=17
    331331                                                                        pos3=19
    332                                                                         help=`echo $line | cut -d'<' -f12`
     332                                                                        help=`echo $line | cut -d'<' -f12 | cut -c 1-2`
    333333                                                                        if [ $help = "br" ]; then
    334334                                                                                nummer4=`echo $line | cut -d'<' -f13 | sed s/" "//g`
     
    358358                                                fi
    359359                                        done < /tmp/curlhelp3.tmp
     360                                        rm /tmp/curlhelp3.tmp
    360361                               
    361362                        else
     
    470471                                                fi
    471472                                        done < /tmp/curlhelp6.tmp
    472                                 cp $FRITZBUCH $FRITZCACHE       
    473                         fi             
     473                                        rm /tmp/curlhelp6.tmp                                   
     474                        fi
     475                        #cp $FRITZBUCH $FRITZCACHE
    474476                fi
    475477        fi     
Note: See TracChangeset for help on using the changeset viewer.