stop/start cam: Please, check my script

  • I made the script below in order to stop/start the cam (I have a DM 800).


    Please, can you:
    - check it (i'm not a specialist!)
    - explain why no message is displayed on the screen (see wget)


    Thank you in adavance!!!



    #!/bin/sh
    ########################################
    ###### Powered by satbox ######
    ########################################
    # camid #
    # 0000 = Commom Interface #
    # 0001->0099 = for User Experiment #
    # 0177 = Rq-Echo-Client #
    # 0178 = RqCS #
    # 0179 = RqCamd #
    # 0189 = OpenCam #
    # 0199 = Dccamd #
    # 0200->0299 = Fbiss #
    # 0300->0399 = Camd3 #
    # 0400->0499 = Camx #
    # 0500->0599 = Camx-Radegast-CS #
    # 0600->0699 = Evocamd -OLD #
    # 0700->0799 = Evocamd_ronlad_cs -OLD #
    # 0800->0899 = Mgcamd -OLD #
    # 0900->0999 = Mgcamd_ronald_cs -OLD #
    # 1000->1099 = Newcamd -OLD #
    # 1100->1199 = Newcamd-ronald_CS -OLD #
    # 1200->1299 = Newcamd-spider -OLD #
    # 1300->1399 = Radegast #
    # 1400->1499 = Ronald-CS #
    # 1500->1599 = Scam #
    # 1600->1699 = Scam-Ronald-CS #
    # 1700->1799 = MPCS #
    # 1800->1899 = NewCS #
    # 2000->2099 = Camd3 #
    # 2300->2399 = Camd3-NewCS #
    # 2600->2699 = Camd3-MPCardserver #
    # 3000->3099 = Evocamd #
    # 3100->3199 = Evocamd-Ronald-CS #
    # 3200->3299 = Evocamd-NewCS #
    # 3300->3399 = Evocamd-MPCardserver #
    # 4000->4099 = Mgcamd #
    # 4100->4199 = Mgcamd-Ronald-CS #
    # 4200->4299 = Mgcamd-NewCS #
    # 4300->4399 = Mgcamd-MPCS #
    # 5000->5099 = Newcamd-Betad #
    # 5100->5199 = Newcamd-Cardserver #
    # 5200->5299 = Newcamd-Spider #
    # 5300->5399 = Newcamd-NewCS #
    # 5400->5499 = Newcamd-MPCS #
    # 6000->6099 = CCcam #
    # 6100->6199 = CCcam-Capmtserver #
    # 6200->6299 = CCcam-NewCS #
    # 6300->6399 = CCcam-MPCS #
    # 7000->7099 = Mbox #
    # 7100->7199 = Mbox-NewCS #
    # 9500->9599 = reserved #
    # 9600->9699 = reserved #
    # 9700->9799 = reserved #
    # 9800->9899 = reserved #
    # 9900->9999 = reserved #
    ########################################


    CAMD_ID=7091
    CAMD_NAME="MboxG v0.4.0023-4"
    CAMD_BIN=mboxg


    INFOFILE_A=ecm.info
    INFOFILE_B=ecm.info
    INFOFILE_C=ecm.info
    INFOFILE_D=ecm.info
    #Expert window
    INFOFILE_LINES=1111111111000000
    #Zapp after start
    REZAPP=0


    ########################################
    logger $0 $1
    echo $0 $1


    remove_tmp () {
    rm -rf /tmp/*.info* /tmp/*.ver* /tmp/*.tmp* /tmp/*.kill* /tmp/*.txt*
    }


    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting cam...&type=1&timeout=5"


    echo "/tmp/mboxg.kill"
    touch /tmp/mboxg.kill
    killall -9 mboxg dccamd 2>/dev/null
    remove_tmp


    /usr/bin/dccamd &
    /usr/bin/mboxg &


    exit 0

  • have you tryed execute that command under telnet console ?


    replace space with %20

    Code
    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam...&type=1&timeout=5"


    and why you dont folow standarts, where are cases {start|stop|restart} ?

    dm8Ksstt+NN2 dm7020+GP
    1.8m+36E;28E;23E;19E;16E;13E;7E
    1.6m+42E;40/39E;36E
    1.0m+10/9E;5E;1W;8W
    0.8m+4/5W
    1.1m+12W;18W;24W
    1.0m+15W;22W;30W
    1.0m+75E;80E
    1.1m+53E;60E

  • Quote

    Originally posted by MartiniB
    have you tryed execute that command under telnet console ?


    replace space with %20

    Code
    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam...&type=1&timeout=5"


    and why you dont folow standarts, where are cases {start|stop|restart} ?


    Thank you, it is OK by adding %20


    One little question more: how can I display a variable in my message command? I tried this but nothing is displayed:


    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam$CAMD_NAME&type=1&timeout=5"

  • Have you tried :

    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam"$CAMD_NA
    ME"&type=1&timeout=5"


    ?

  • Quote

    Originally posted by darius2kiwisouci
    Have you tried :

    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam"$CAMD_NA
    ME"&type=1&timeout=5"


    ?


    Code
    wget -q -O - "http://root:mypassword@127.0.0.1/web/message?text=Restarting%20cam"$CAMD_NAME"&type=1&timeout=5"


    Yes that will work if you declare your variable like this


    Code
    CAMD_NAME=%20MboxG%20v0.4.0023-4