Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [Announce] "Alarmed" scheduling App (supports automatic GPRS data counter resetting)

    Reply
    Page 30 of 54 | Prev | 20   28     29   30   31     32   40 | Next | Last
    Spotfist | # 291 | 2010-08-12, 13:38 | Report

    isn't sleep like a wait cammand? thanks

    Thanks for the link too, how come a google search nor power search returns all this good stuff! will use this as a start

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Spotfist; 2010-08-12 at 13:50.

     
    Spotfist | # 292 | 2010-08-12, 15:22 | Report

    right I created a script called starcon.sh I stuck it in /home/user/MyDocs/Scripts/starcon.sh

    it has this line of "code" in it, it should open up a connection...

    dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"[ANY]" uint32:0

    I set alarmed to run it say in a 1 mins time but nothing. is there something obvious Im doing wrong, does the script have to be in a certain location do I need a sudo gainroot line in the sh file?

    I created the file in leafpad could that cause a problem? I have Autodisconnect installed aswell but thought that would just allow the connection as if by another app...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Spotfist | # 293 | 2010-08-13, 08:34 | Report

    sorry for the triple post but can anyone help with this issue? Spent all day trying out different ways to get the script to work, found another phone control page that showed a

    #!/bin/sh

    but this did not work, I know alarmed is working but there must be something wrong with my script could someone perhaps upload an example script to open "ANY" connection? Pleeeeease, this is driving me insane

    Edit | Forward | Quote | Quick Reply | Thanks

     
    x-lette | # 294 | 2010-08-13, 11:56 | Report

    1) Is the script executable? if not, alarmed will not be able to execute it. You could also prepend the call with a "/bin/sh" or "/bin/bash"

    2) Did you try to run the script from commandline? If it works, you might double-check the calling line in alarmed. Watch out for case sensitivity!

    3) If the script itself doesn't work try to replace ANY with a name of an existing data connection. (My line directly calls "E-Plus Internet" so there will be no unwanted connections to "mms" or "Dummy Network")


    The line "#!/bin/sh" is called a shebang and only works within a script (it's prepended with a comment sign, therefore on command line it will just do nothing). This line tells the calling interpreter whether it shall call the script with another interpreter or work with some special options.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by x-lette; 2010-08-13 at 12:10. Reason: added own line
    The Following User Says Thank You to x-lette For This Useful Post:
    Spotfist

     
    Spotfist | # 295 | 2010-08-13, 12:17 | Report

    Do I execute with "exec=/home/user/scripts/starcon.sh" if so then no it doesn't execute it does nothing and goes to the next line.

    I have replaced "#!/bin/sh" with /bin/sh and have also replaced the "ANY" with "web'n'walk" still nothing, I assumed the # implied that something was commented out but seriously I was cluching at straws as I found that on another phone control page.

    Does web'n'walk have to be in caps? will try that...

    Thanks for your help.

    I tried a reboot script aswell but this also doesn't seem to work when I try exec=/home/user/scripts/reeboot.sh I have created the scripts in leafpad could that be a problem?

    they look like this

    /bin/sh dbus....blah....blah

    all on one line.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Spotfist; 2010-08-13 at 12:27.

     
    x-lette | # 296 | 2010-08-13, 13:15 | Report

    Originally Posted by Spotfist View Post
    Do I execute with "exec=/home/user/scripts/starcon.sh" if so then no it doesn't execute it does nothing and goes to the next line.
    On commandline you call the script like that
    /home/user/scripts/starcon.sh
    or like that
    /bin/sh /home/user/scripts/starcon.sh

    The latter one if the file is not marked as executable. You can check that with calling the command
    ls -l /home/user/scripts/starcon.sh
    the resulting line should begin with
    -rwxr--r-- (or similar)
    On position 4 and probably 7 and 10 there should be an 'x', then it's executable. If there is a '-', it's not executable.

    Originally Posted by
    I have replaced "#!/bin/sh" with /bin/sh
    Where did you replace that? In the script, on command line or in alarmed?

    Originally Posted by
    and have also replaced the "ANY" with "web'n'walk" still nothing, I assumed the # implied that something was commented out but seriously I was cluching at straws as I found that on another phone control page.
    Yes, the '#' comments out the following line. In the special case it's in a script on the very first line and is followed by an exclamation mark '!' this has a a special meaning.

    Originally Posted by
    Does web'n'walk have to be in caps? will try that...
    I don't think so. But don't forget to put it in quotation marks.

    Originally Posted by
    I tried a reboot script aswell but this also doesn't seem to work when I try exec=/home/user/scripts/reeboot.sh I have created the scripts in leafpad could that be a problem?

    they look like this

    /bin/sh dbus....blah....blah

    all on one line.
    In the script just call the dbus command with no /bin/sh preceeding the line. Also don't put that exec= to the call. I guess you may want to have a look at the scripts in the wiki and follow the guides explained there.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to x-lette For This Useful Post:
    Spotfist

     
    Spotfist | # 297 | 2010-08-13, 15:14 | Report

    Wayhey! Got it! What a mission, "/bin/sh /home/user/scripts/starcon.sh" works, without the "/bin/sh" I get a permission denied error which of course wouldn't have been shown in Alarmed. I tried with "web'n'walk" and it did nothing but with "[ANY]" it worked but said "no saved connectiones available" at least I know it is working now so I can see if anyone has resolved this. Thanks!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    GEONXT | # 298 | 2010-08-13, 19:49 | Report

    I have removed alarmed and re installed now cant see any of my scripts when i open alarmed, but they are all still running anyone know how to wipe all the scripts withought using alarmed?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    shapeshifter | # 299 | 2010-08-14, 11:38 | Report

    Originally Posted by GEONXT View Post
    I have removed alarmed and re installed now cant see any of my scripts when i open alarmed, but they are all still running anyone know how to wipe all the scripts withought using alarmed?
    See the very first post:

    Originally Posted by
    Notes:
    • If it should happen that you create an event and for some reason it gets lost from Alarmed's menu/list, but still exists and acts, look in /var/cache/alarmd/alarm_queue.ini and you'll find your event somewhere at the bottom. It comes with a "cookie", which identifies it. For example: "cookie: 886". You can then use the CLI interface to delete the event. It will tell you it doesn't exist, but it will nevertheless delete the backend-event:
      Code:
      /opt/alarmed/alarmed.py -CD 886
      Don't mess with the alarm_queue.ini, you might do serious damage!

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to shapeshifter For This Useful Post:
    GEONXT

     
    Oyabun | # 300 | 2010-08-19, 09:51 | Report

    Originally Posted by
    All functions (alarm, built-in function, switch profile) work fine except the command line. Coppied in xterm the same command does what it should, but in Alarmed nothing. Not even a message.
    My mistake. Mea culpa! It works perfect!

    I did rsync in the command line and the only way to check the function is to check the result on the transfered files. There is no other feedback from the program if it executes rsync or not (which is a bit awkward, but more a rsync-issue). So you need to trust it more or less.

    Somethin else:
    What about implementing a button like "Execute now"? This way you don't have to change the setting if you want to see the result, which could be very helpful for command execution mode. Just an idea...

    And thanks a lot for the program!

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 30 of 54 | Prev | 20   28     29   30   31     32   40 | Next | Last
vBulletin® Version 3.8.8
Normal Logout