• 26 Posts
  • 693 Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle





  • 0 4   *   *   *    /usr/sbin/reboot
    

    Adjust interval as needed.

    Or if you want something a bit faster and less disruptive:

    #!/bin/sh
    
    NAME="$0"
    
    logger_cmd () {
      echo $@
      logger -p daemon.info -t "$NAME[$$]" $@
    }
    
    if ! which ncat 1>/dev/null
    then
      logger_cmd "ncat not found, installing..."
      opkg update && opkg install ncat
    fi
    
    chk_conn () {
      echo "Checking connectivity to $@"
      if ncat --send-only --recv-only -w 334ms $@ 2>/dev/null; then
        return 0
      fi
    
      logger_cmd "Cannot reach $@"
      return 1
    }
    
    restart_network_iface() {
        # TODO: Don't restart every minute
    
        COOLDOWN_LOCK=/tmp/internet-connectivity-watchcat.tmp
        COOLDOWN_SECONDS=300
    
        cooldown_time_end=$(cat $COOLDOWN_LOCK || echo 0)
    
        time_now="$(cat /proc/uptime)"
        time_now="${time_now%%.*}"
    
        cooldown_time_left=$((cooldown_time_end - time_now))
    
        if [ "$cooldown_time_left" -lt "1" ]
        then
            logger_cmd "Restarting network interface: \"$1\"."
            ifdown "$1"
            ifup "$1"
    
            cooldown_time_end=$((time_now + COOLDOWN_SECONDS))
            echo $cooldown_time_end > $COOLDOWN_LOCK
        else
            logger_cmd "Skipping interface \"$1\" restart due to cooldown. Cooldown left: $cooldown_time_left seconds"
        fi
    }
    
    
    logger_cmd "Checking internet connectivity..."
    
    if   chk_conn google.com 443 \
      || chk_conn amazon.com 443 \
      || chk_conn facebook.com 443 \
      || chk_conn cloudflare.com 443 \
      || chk_conn telekom.de 443
    then
      logger_cmd "Connected to internet."
    else
      logger_cmd  "Not connected to internet."
      restart_network_iface "$1"
    fi
    

    In restart_network_iface use /usr/sbin/reboot instead of interface up/down and run the script every few minutes via cron or systemd timer. This was written for OpenWrt so if you use that you can use it as-is. For other systems you’d also have to adjust the logger_cmd.

    You can place that on another machine and send a signal to a smart plug instead if you’re worried of a locked up / frozen router. That said if your router freezes like that, you should probably change it and you should be able to run this script on it.










  • Oligarchs have been unified by their pursuit for profit long before Russia became able to push any sort of effective propaganda to Americans. The Heritage Foundation that peddles these ideas did not emerge from Russian interference in 2016. Neither did Fox whose entire purpose is peddling domestic oligarch propaganda. Neither did the Chicago School of Economics anti-worker takeover of national economic policy. US oligarchs did not offshore middle class jobs or bust unions on Russian advice. This has been going on for a lot longer than the last decade. The pushback started as a result of FDR’s redistribution policies that cut US oligarch wealth in the aftermath of the Great Depression. First slowly, then more quickly.

    And your “only way out of this” – why you don’t you tell me in small steps exactly how that happens. Lets hear it.

    Campaign, donate and vote for “far-left” D candidates at every gov’t level - like AOC, Zohran, etc. Campaign, donate and vote for “far-left” independent candidatss where there’s no such candidates in that district. Join a union. Join a local socialist org. Eventually you’d tilt the balance of power in various gov’t institutions. Whenever you do that, you tax the rich to death. But that goes without saying cause every “far-left” candidate has that on their agenda.

    E: FWIW, was where you are in my thinking a few years ago. I didn’t know as much about the historical development of econimic policy in the US, who drove it, who got richer, who got poorer, what tools were being used to do one or the other.

    E2: And in case it isn’t clear how taxing the rich to death solves the problem, it deprives them from the money they need to buy the democratic system. It puts that money back into the majority’s pockets. Politicians have to fight for that money and therefore go back to serving the majority. They start passing the laws that you want passed. Like curbing online propaganda from both Zuckerberg and Putin. And many others that serve you instead of Bezos.

    If on the other hand you eliminate all foreign propagnda with a magic wand today, all domestic propaganda will remain. Democratic control will remain in the hands of the oligarchs. They would keep making Americans poorer and poorer while scapegoating yet another group or actor. The most impoverished would completely lose faith in the democratic system because it no longer solves their problems. When the oligarchs propose a candidate who promises to solve the poverty (they themselves created) by dismantling democracy (since democracy is the only nonviolent tool that can strip them of their wealth), the desperate would vote for that. As FDR, and many others have explained a century ago.


  • The thinking that any of the current fallout in the US is foreign-led is not giving any good explanations for the reality we observe and therefore procides no good solutions. What you’re observing is primarily driven by the oligarch class in the US finding new ways to extract profit. That drives everything. It drives Fox, it drives the Heritage Foundation, it drives turning both parties in oligarch-serving machines. External factors are only helping accelerate it a bit. Feeding this machine with resources from the outside is a bad idea since most of those resources would be captured by the oligatchs. The only way out of this is to get an internal populist left movement to curb their power, reposses most of their resources and redestribute them to the masses.