From c7b05df1c2a12c2d45c0e07e8bcd22f8072458f8 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Sun, 23 Jul 2017 23:46:00 -0700 Subject: [PATCH] extend docs/misc_tips_troubleshooting.md --- docs/misc_tips_troubleshooting.md | 16 ++++++++++++++++ site/index.html | 2 +- site/misc_tips_troubleshooting/index.html | 13 +++++++++++++ site/mkdocs/search_index.json | 4 ++-- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/misc_tips_troubleshooting.md b/docs/misc_tips_troubleshooting.md index ee8a718..a15a8b6 100644 --- a/docs/misc_tips_troubleshooting.md +++ b/docs/misc_tips_troubleshooting.md @@ -9,6 +9,22 @@ for machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\ do lxc exec "${machine}" -- bash -c "cat /etc/apt/apt.conf.d/02*" ; done ``` +fish shell is actually a little bit cleaner + +```fish +for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \ + lxc exec $machine -- bash -c "cat /etc/apt/apt.conf.d/02*" ; end +``` + +```fish +# change all their time zones +for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \ + lxc exec $machine -- bash -c "timedatectl set-timezone America/Los_Angeles" ; end +# check to see if anyone is logged in before rebooting +for machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \ + echo $machine ; lxc exec $machine -- bash -c "who" ; end +``` + ## Ubuntu-Mate-Welcome-Center doesn't work some for some repos Perhaps your apt-cacher-ng proxy server isn't configured to allow diff --git a/site/index.html b/site/index.html index 9810236..9392021 100644 --- a/site/index.html +++ b/site/index.html @@ -228,5 +228,5 @@ diff --git a/site/misc_tips_troubleshooting/index.html b/site/misc_tips_troubleshooting/index.html index ffb0174..719da65 100644 --- a/site/misc_tips_troubleshooting/index.html +++ b/site/misc_tips_troubleshooting/index.html @@ -170,6 +170,19 @@ do lxc exec "${machine}" -- bash -c "cat /etc/apt/apt.conf.d/02*" ; done +

fish shell is actually a little bit cleaner

+
for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \
+    lxc exec $machine -- bash -c "cat /etc/apt/apt.conf.d/02*" ; end
+
+ +
# change all their time zones
+for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \
+    lxc exec $machine -- bash -c "timedatectl set-timezone America/Los_Angeles" ; end
+# check to see if anyone is logged in before rebooting
+for machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \
+    echo $machine ; lxc exec $machine -- bash -c "who" ; end 
+
+

Ubuntu-Mate-Welcome-Center doesn't work some for some repos

Perhaps your apt-cacher-ng proxy server isn't configured to allow traffic through from https sources. Make sure the following is diff --git a/site/mkdocs/search_index.json b/site/mkdocs/search_index.json index 48623d2..6db5c37 100644 --- a/site/mkdocs/search_index.json +++ b/site/mkdocs/search_index.json @@ -432,7 +432,7 @@ }, { "location": "/misc_tips_troubleshooting/", - "text": "Misc Tips, TroubleShooting\n\n\nSending commands to LXD containers\n\n\nUse \nbash -c \"\"\n for commands with wildcards. i.e.\n\n\nfor machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done\n\n\n\n\nUbuntu-Mate-Welcome-Center doesn't work some for some repos\n\n\nPerhaps your apt-cacher-ng proxy server isn't configured to allow \ntraffic through from https sources. Make sure the following is\nuncommented. This applies for all PPA's that use https.\n\n\n# /etc/apt-cacher-ng/acng.conf\nPassThroughPattern: .*", + "text": "Misc Tips, TroubleShooting\n\n\nSending commands to LXD containers\n\n\nUse \nbash -c \"\"\n for commands with wildcards. i.e.\n\n\nfor machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done\n\n\n\n\nfish shell is actually a little bit cleaner\n\n\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; end\n\n\n\n\n# change all their time zones\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"timedatectl set-timezone America/Los_Angeles\" ; end\n# check to see if anyone is logged in before rebooting\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \\\n echo $machine ; lxc exec $machine -- bash -c \"who\" ; end \n\n\n\n\nUbuntu-Mate-Welcome-Center doesn't work some for some repos\n\n\nPerhaps your apt-cacher-ng proxy server isn't configured to allow \ntraffic through from https sources. Make sure the following is\nuncommented. This applies for all PPA's that use https.\n\n\n# /etc/apt-cacher-ng/acng.conf\nPassThroughPattern: .*", "title": "Misc Tips, Trouble Shooting" }, { @@ -442,7 +442,7 @@ }, { "location": "/misc_tips_troubleshooting/#sending-commands-to-lxd-containers", - "text": "Use bash -c \"\" for commands with wildcards. i.e. for machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done", + "text": "Use bash -c \"\" for commands with wildcards. i.e. for machine in $(lxc list | grep RUNNING | awk '{print $2}') ;\\\n do lxc exec \"${machine}\" -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; done fish shell is actually a little bit cleaner for machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"cat /etc/apt/apt.conf.d/02*\" ; end # change all their time zones\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; \\\n lxc exec $machine -- bash -c \"timedatectl set-timezone America/Los_Angeles\" ; end\n# check to see if anyone is logged in before rebooting\nfor machine in (lxc list | grep RUNNING | awk '{print $2}') ; echo ; \\\n echo $machine ; lxc exec $machine -- bash -c \"who\" ; end", "title": "Sending commands to LXD containers" }, {