• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 57.1k 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.
  • H Offline
    hoba
    last edited by Nov 7, 2006, 12:36 AM

    Yes.

    1 Reply Last reply Reply Quote 0
    • A Offline
      alexus
      last edited by Nov 7, 2006, 12:39 AM

      I'm there now, still cant find the file weher intergface assigments are stored… unles its webguiconfig.in

      1 Reply Last reply Reply Quote 0
      • A Offline
        alexus
        last edited by Nov 7, 2006, 12:48 AM

        $g['varrun_path'] . "/lan.conf.dirty";

        Is that config I need? what tha value of g[varrun_path]?

        1 Reply Last reply Reply Quote 0
        • S Offline
          sullrich
          last edited by Nov 7, 2006, 2:04 AM

          /etc/inc/globals.inc

          1 Reply Last reply Reply Quote 0
          • A Offline
            alexus
            last edited by Nov 7, 2006, 2:07 AM

            actually I was fullish and miss the part in the main confog file that is cleraly saying LAN=eth1 etc in the XML file, just as usual…. so now im looking on how to read XML w/ bash script... aperantly i have no idea how to do that...

            1 Reply Last reply Reply Quote 0
            • S Offline
              sullrich
              last edited by Nov 7, 2006, 2:11 AM

              Erm, I dont think there is a EASY way to do this.  Good luck!

              1 Reply Last reply Reply Quote 0
              • A Offline
                alexus
                last edited by Nov 7, 2006, 2:13 AM

                Good, so at the end you wont tell me that my script is too easy :-P

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sullrich
                  last edited by Nov 7, 2006, 2:15 AM

                  Technically you could call php from your bash script and echo out the values after parsing but this is going to be SLLLOOOW.

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    alexus
                    last edited by Nov 7, 2006, 2:20 AM

                    well besides slow it will eat extra ~15% of CPU, for wrap that is not an option. And in combination to the fact that the script does HTTP request to the external server I definettly dont want to call PHP XML parser… in my case I will have to call it min 2 times and the  3rd will be external HTTP request.

                    Well lets see what i end up with. Im sure linux/bsd shuld have ability to read xml files.

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jeroen234
                      last edited by Nov 7, 2006, 11:00 PM

                      lets take a look at it from a difrent side and use the pfsense rules file and get there the lan and wan from

                      
                       #!/bin/sh
                      lan=`awk '/lan = "\{ /{ print $0 }' /tmp/rules.debug | sed -e 's/lan = "{ //' | sed -e 's/ }"//'`
                      wan=`awk '/wan = "\{ /{ print $0 }' /tmp/rules.debug | sed -e 's/wan = "{ //' | sed -e 's/ }"//'`
                      echo "lan interface=" $lan
                      echo "wan interface=" $wan
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        alexus
                        last edited by Nov 7, 2006, 11:28 PM

                        nice that screept does work.. i was doing almost the same w/ xml just now… but as I see in that example it uses temp dir? is that dor will be included in future releases? is that dir exist in mono, and finally what rules does it refering to? firewall rules? what if NAT is disabled?
                        Tnx

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jeroen234
                          last edited by Nov 7, 2006, 11:32 PM

                          i have made that script on a running pfsense embedded 1.01 soekris
                          /tmp/rules.debug is the running firewall config of pfsense
                          mono will have it to i think
                          nat on or off will not chance the lan of wan interface on the firewall

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            alexus
                            last edited by Nov 7, 2006, 11:51 PM

                            ok if that folder is permament and present on both mono and pfSense I will use it …
                            Less hedeach reading XML file for me..

                            Tnx

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              alexus
                              last edited by Nov 8, 2006, 1:16 AM

                              Ok,  operational script partd is done! Now time to build user enterface. PHP time :-) well almowst php + DNS, I hate my DNS…

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                alexus
                                last edited by Nov 9, 2006, 1:41 AM

                                Ok, good part of Webinterface is done now.
                                One problem, I was trying to use fetch instead of wget (as sudgested earlier) but a) I cant make it to work b) it doesnt work as spider

                                So, is it posible to install WGET to the system and include it in the distribution?

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sullrich
                                  last edited by Nov 9, 2006, 2:27 AM

                                  What doesn't work with fetch?

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    alexus
                                    last edited by Nov 9, 2006, 2:30 AM

                                    everithing, I tryed all posible syntax and never got it to work …

                                    Can you give me a sample code on using fatch to open lets say http://example.com and do not download any info?

                                    1 Reply Last reply Reply Quote 0
                                    • S Offline
                                      sullrich
                                      last edited by Nov 9, 2006, 2:31 AM

                                      What do you mean "do not download any info?"

                                      Do you mean quiet?

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        alexus
                                        last edited by Nov 9, 2006, 2:32 AM

                                        Spider mode = no downloads
                                        quite mode = no output

                                        Technicaly i need them both

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sullrich
                                          last edited by Nov 9, 2006, 2:33 AM

                                          Quiet and no downloads?  Sorry but I dont follow you.  The point of fetch and wget is to download/fetch a page.

                                          1 Reply Last reply Reply Quote 0
                                          33 out of 103
                                          • First post
                                            33/103
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received