@Nathan-Guyette if the code is similar and it just some parameter change (as your beeping examples), I'd use a configuration file that is retrieved at startup using http(s) either by the program or the system (wget) and then sets the running parameters accordingly.
Selecting the appropriate configuration on the web server can be done based on the requesting machine IP or sending some parameter.
If you want a complete change of behaviour, the you can use wget to retrieve the whole program and run it.
/etc/rc.local is your friend
Victoriano Giralt
@victoriano
Doing Unix since 1985, Linux since 1993. Programming in Python since 1994, Django since 2008. Systems administrator of things big and small since 1986. Networking, mostly IP, but not only, since 1986. I've forgotten how many languages I've programmed in but I've lately reduced them to Python and the Unix shell (and tools) and, of course, LaTeX/beamer for presentations :-) I love vim, all things with Linux inside (even other Unixes) and open* (software, hardware, knowledge, ...).
Best posts made by victoriano
-
RE: Stem cell differentiation architecture
-
RE: Wireless Bridge Support
Posting the output of "ip a", "ip r" and, very specially, "brctl show" would be very useful to help diagnose the situation and see if you have a router or a bridge.
-
RE: using terminal commands results in variable does not work in PYTHON
Why don't you just read the (pseudo) file? No need to open new processes. Using
w = int(open('/sys/class/leds/omega2lte:blue:wifi/brightness').read())
Will give you what you need from python in a pythonic way.
-
RE: How to fix the SSH "no matching host key type found" error
@crispyoz it is also possible to re-enable it permanently only for your user in the Ubuntu system and your Onion, by editing or creating a file named "config" inside your ~/.ssh directory with something like:
Host onion HostKeyAlgorithms+=ssh-rsa
onion here is your Onion IP address or the name you use to ssh into it.
I use it a lot to be able to access old systems without having to type the options once and again.
It is also useful for reenabling KeyAlgorithms or setting per host options or user name, or ...
Use it with care and only when needed for a given host -
RE: FAQ: How do I check if I'm successfully connected to a WiFi network?
@crispyoz fully agreed. But you can then use the neighbour table (a.k.a. ARP in IPv4 world) to see if those you have found via grep have shown any vital signs recently. Of course, if your Omega is their router, they SHOULD (RFC 2119) show in that table if they have a minimum activity.
-
RE: FAQ: How do I check if I'm successfully connected to a WiFi network?
if you do
logread | grep dhcp
you will see the associated stations getting ip addresses assigned to their MAC addresses, like:
Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPREQUEST(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPACK(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
if you are not using DHCP because you use fixed addresses or IPv6, then
ip neigh show dev br-wlan
will show know MAC addresses, like:
192.168.3.173 lladdr 84:cf:bf:xx:xx:xx ref 1 used 0/0/0 probes 1 REACHABLE fe80::6:af0a:307c:37ae lladdr 84:cf:bf:xx:xx:xx used 0/0/0 probes 1 REACHABLE
I'd recommend using the new iw command but, although it exists in our Omegas, the modern nl80211 seems not to be available, so it does not work. If it did, it would be very easy to dump the connected stations.
Latest posts made by victoriano
-
RE: How to fix the SSH "no matching host key type found" error
@crispyoz it is also possible to re-enable it permanently only for your user in the Ubuntu system and your Onion, by editing or creating a file named "config" inside your ~/.ssh directory with something like:
Host onion HostKeyAlgorithms+=ssh-rsa
onion here is your Onion IP address or the name you use to ssh into it.
I use it a lot to be able to access old systems without having to type the options once and again.
It is also useful for reenabling KeyAlgorithms or setting per host options or user name, or ...
Use it with care and only when needed for a given host -
RE: Wireless Bridge Support
Posting the output of "ip a", "ip r" and, very specially, "brctl show" would be very useful to help diagnose the situation and see if you have a router or a bridge.
-
RE: using terminal commands results in variable does not work in PYTHON
Why don't you just read the (pseudo) file? No need to open new processes. Using
w = int(open('/sys/class/leds/omega2lte:blue:wifi/brightness').read())
Will give you what you need from python in a pythonic way.
-
RE: [GUIDE] Install OpenWrt 18.06 on Onion Omega2 Pro
I always prefer mainline distros over very specialised ones. Do you know if OpenWRT 19.07 supports Omega2 Dash features?
-
RE: FAQ: How do I check if I'm successfully connected to a WiFi network?
@crispyoz fully agreed. But you can then use the neighbour table (a.k.a. ARP in IPv4 world) to see if those you have found via grep have shown any vital signs recently. Of course, if your Omega is their router, they SHOULD (RFC 2119) show in that table if they have a minimum activity.
-
RE: FAQ: How do I check if I'm successfully connected to a WiFi network?
if you do
logread | grep dhcp
you will see the associated stations getting ip addresses assigned to their MAC addresses, like:
Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPDISCOVER(br-wlan) 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPOFFER(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPREQUEST(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx Wed Sep 30 16:57:05 2020 daemon.info dnsmasq-dhcp[1877]: DHCPACK(br-wlan) 192.168.3.173 84:cf:bf:xx:xx:xx
if you are not using DHCP because you use fixed addresses or IPv6, then
ip neigh show dev br-wlan
will show know MAC addresses, like:
192.168.3.173 lladdr 84:cf:bf:xx:xx:xx ref 1 used 0/0/0 probes 1 REACHABLE fe80::6:af0a:307c:37ae lladdr 84:cf:bf:xx:xx:xx used 0/0/0 probes 1 REACHABLE
I'd recommend using the new iw command but, although it exists in our Omegas, the modern nl80211 seems not to be available, so it does not work. If it did, it would be very easy to dump the connected stations.
-
RE: onion 2s does not save any data
Friends, have you noticed the message in the first posted image warning about a CRC problem and use of default environment?
I'm attaching the image with a red arrow pointing to the message. Maybe that's the root cause of all problems in this thread...
-
RE: Stem cell differentiation architecture
@Nathan-Guyette if the code is similar and it just some parameter change (as your beeping examples), I'd use a configuration file that is retrieved at startup using http(s) either by the program or the system (wget) and then sets the running parameters accordingly.
Selecting the appropriate configuration on the web server can be done based on the requesting machine IP or sending some parameter.
If you want a complete change of behaviour, the you can use wget to retrieve the whole program and run it.
/etc/rc.local is your friend -
RE: Installing a Browser
@crispyoz just to increase the number of googled terms ... my spider was implemented on OpenVMS
-
RE: Installing a Browser
@crispyoz I lov lynx I even used it to create a web spider when Google inventors were in high school