View Single Post
Posts: 182 | Thanked: 40 times | Joined on Apr 2010 @ Seatle, WA
#84
Originally Posted by VaZso View Post
Hi,

I've played a little bit, because I couldn't manage to launch the script on calls via dbus-scripts.d, it happened nothing.

I don't know how good it is or not and how affect the power consumption of the phone, but it seems to be working, although it is about 1 hour old.

I start it upon boot and now SIP and Skype connections work fine.

So, here it is:
Code:
#!/bin/sh

let LAST=2
while true; do

    if [ $(pidof telepathy-stream-engine) ]; then
            let NOW=1
        else
            let NOW=0
    fi
    
    if [ $NOW != $LAST ]; then

        if  [ $NOW -eq 0 ]; then
            sh /bin/speedadaptnormal > /dev/null
        else
            sh /bin/speedadaptfix > /dev/null
        fi
    fi

    if [ $(pidof telepathy-stream-engine) ]; then
            let LAST=1
        else
            let LAST=0
    fi
    sleep 5
done
Maybe the 'code' itself is not the best, and it is my very first try to make something like a 'script', so please be patient.

I don't know its possibilities, so if anyone can advice a better solution, I'm happy to hear it.

Also, if you say it is a completely bad solution, please write your opinion.
can this not be put in some event.d and the script be called when some event happen? I am not sure what event to trigger to, but just a thought.