Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Online / Offline Status Notification System via push

    Scheduled Pinned Locked Moved Development
    103 Posts 7 Posters 53.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      alexus
      last edited by

      who cares about original point :-P
      i used wget yo open the remote webpage and transfer variables to remote server via HTTP POST -this is called -spider in wget

      wger –spider -q "http://ecample.com?cmd=Hello2%World"

      This will send Hello World to remote webserver. and at the same time will not download or save anything. Well some times i can run as spider but not in quite mode so i can see if the requested page returns me an error. This technique is used by google and paypal

      1 Reply Last reply Reply Quote 0
      • S
        sullrich
        last edited by

        fetch -o - "http://blah.url.com/test.php?testing=test&propermodulation=true" >/dev/null

        1 Reply Last reply Reply Quote 0
        • A
          alexus
          last edited by

          Ok good seams to work :-) Tnx
          Now I have to join the GUI with the script and set DNS and i'm done on the client side  ;D

          1 Reply Last reply Reply Quote 0
          • A
            alexus
            last edited by

            I jaws was trying to use my GUI to modify crontabfile but no luck… i went to actual file and found out this message:

            DO NOT EDIT THIS FILE - edit the master and reinstall.

            (/tmp/crontab.lfJ3UAOksN installed on Thu Nov  9 04:03:50 2006)

            (Cron version – $FreeBSD: src/usr.sbin/cron/crontab/crontab.c,v 1.22 2004/09/14 19:01:19 dds Exp $)

            */60 * * * * sh /usr/local/StatusNotifier/server_status.sh >/dev/null 2>&1

            The cron that is there is the one that i installed but I want to let my GUI to be able to edit cron job, but as file says I cant edit it?  :o as i would normally do under linux. So how can I edit cron file with out reinstalling it? I dont think I can reinstalll it via script, one way or another its alternating and saving  the file content.

            Well maybe i missing something? Any ideas?

            1 Reply Last reply Reply Quote 0
            • S
              sullrich
              last edited by

              Edit /etc/crontab

              killall -HUP cron

              1 Reply Last reply Reply Quote 0
              • A
                alexus
                last edited by

                ok Clinent Side is 98% Done, Server side is 30% Done

                1 Reply Last reply Reply Quote 0
                • S
                  sullrich
                  last edited by

                  I still have no idea what your working on but good luck. ;)

                  One bit about that fetch command… Do check the shell return code.  fetch will fail if a problem occurred.

                  I apologize if you are already doing so.

                  1 Reply Last reply Reply Quote 0
                  • A
                    alexus
                    last edited by

                    " fetch will fail if a problem occurred" - do you mean problem w/ connection or remote server? If so well i'll live w/ it for now… I alredu had enough headach transforming script from Linux to BSD, and then making GUI working the way it should.

                    As to what im doing is something like SNMP but in reverse... im my case router send its status to the server. If router doesnt send its status server marks device as of line and notifies device owner about the failute. Also owner can look up curent WAN Ip and other config in central location on the web...

                    1 Reply Last reply Reply Quote 0
                    • S
                      sullrich
                      last edited by

                      It is the shell return code.  What if the remote server is off line?  You are assuming the update went through ok?

                      1 Reply Last reply Reply Quote 0
                      • A
                        alexus
                        last edited by

                        Well if remote server is ofline then it a problem at this moment. In future if ppl will be using the feasture I add backup server support, and buffer, to store data untill we got connection

                        1 Reply Last reply Reply Quote 0
                        • A
                          alexus
                          last edited by

                          do you mean like fetch {print $0}? or something else?
                          Im not too good in linux/bsd scripting

                          1 Reply Last reply Reply Quote 0
                          • S
                            sullrich
                            last edited by

                            Simply test $? after the fetch command.

                            fetch -o -o "http://pfsense.com/fake.txt" >/dev/null
                            if [ $? != 0 ]; then
                                    # command failed!
                                    echo "pfsense fake: Nope, didnt work"
                            fi

                            fetch -o -o "http://www.pfsense.com" >/dev/null
                            if [ $? != 0 ]; then
                                    # command failed!
                                    echo "pfsense failed"
                            else
                                    echo "pfsense worked"
                            fi

                            1 Reply Last reply Reply Quote 0
                            • A
                              alexus
                              last edited by

                              Ok I can add that but, what will it give me? Server stil doesnt gets the report, well i can set another cron to exevute in say 10 min or something, or I dono yet…

                              my brain is fried today

                              1 Reply Last reply Reply Quote 0
                              • S
                                sullrich
                                last edited by

                                As long as there are no negative issues if the commands fail then don't worry about it.  I don't know your source code so I am just preaching best practices at this point.

                                1 Reply Last reply Reply Quote 0
                                • A
                                  alexus
                                  last edited by

                                  No no negative affect… the only thing will happen is that sever will say thta device is down thats all....

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    jeroen234
                                    last edited by

                                    how do the webserver site look like
                                    somting like the status of the wifidog captive portal network server  page ?

                                    http://auth.ilesansfil.org/node_list.php

                                    1 Reply Last reply Reply Quote 0
                                    • A
                                      alexus
                                      last edited by

                                      Yes, same thing… I didt know it exist alredy, but I got same thing.  Well maybe more functionality on server side, like private profiles, because its not that good for DownTown Alliance to say that their AP is down on 60 Wall for 7 days , especially when we have our office on 120 :-P

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jeroen234
                                        last edited by

                                        its part of the wifidog project maybe i can get it to work on pfsense
                                        the pfsense captive portalneeds a popup windows to be open
                                        wifidog don't need that so on pda's and mobile foons it works to

                                        http://dev.wifidog.org/wiki/About

                                        Features

                                        * Captive portal which lets hotspot owners communicate with their users (custom content management).
                                            * Wifidog gateway runs on GNU/Linux server and embedded device like the Linksys WRT54G with OpenWRT.
                                            * Multi-language support: English, French, German and Portuguese.
                                            * Maintain the connection by checking network activity instead of a javascript window. This allows PDAs and cellphones to connect.
                                            * Users are unique and have a valid email address in order to open an account. Their privacy must be respected. You can also use a splash only page and do not ask user to create an account.
                                            * Users are able to create a working account directly from any hotspot. New users sign on from any hotspot, create their account and are granted access for 15 minutes to confirm an email. If they don't, they are disconnected.
                                            * Hotspot monitoring by two way heartbeating, so the central server always knows which hotspots are up, regardles of dynamic DNS, firewalls, etc.
                                            * Firewall has one rule to jump in, one to jump out when a connection is rejected, and one to jump out when a connection is accepted. The gateway must do its own NAT. All this allows wifidog to be integrated easily into an existing firewall configuration.
                                            * Statistics : Cumulative bandwidth usage accounting (per connection, per user, per hotspot)
                                            * Self-identification of the gateways ???

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          alexus
                                          last edited by

                                          I have barebone for what they ahave alredy! (
                                          Let me finish some parts and I will release clinet code)
                                          I have CP wotking on my cell :-P
                                          Content managmant is easy, ad managment is possible too (but sorry I pattented the ad managment :-P )
                                          I even can do way more what they have if some on will help me with dirty GUI work.

                                          The down side of they have (i thiink) is that they want to controll a hotspot in fill, they becomeing an ISP and if device is odd to be used by ISP lime ourselfs you are getting in to the conflict, who should have client info etc. The thing  wthat im integrating is simplified version of our internal and propriatary idea on hotspot managmant. It is designed that all the info and controll will be cept by the hotspot owner, we just have and interface to monitor whats going on at the moment (in fiture I might add ability to remotely controll)

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            jeroen234
                                            last edited by

                                            looking forward to test youre files on my soekris

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.