summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-rwxr-xr-xsh/dnd2
-rwxr-xr-xsh/upd13
2 files changed, 11 insertions, 4 deletions
diff --git a/sh/dnd b/sh/dnd
index a2d2944..e501ead 100755
--- a/sh/dnd
+++ b/sh/dnd
@@ -27,7 +27,7 @@ else
fi
for domain in www.google.com www.baidu.com github.com gitlab.com codeberg.org www.douyu.com flylightning.xyz mirrors.flylightning.xyz git.flylightning.xyz mail.flylightning.xyz one.sjsu.edu discord.com www.youtube.com mail.google.com mail.yahoo.com en.wikipedia.org zh.wikipedia.org archlinux.org gitlab.archlinux.org aur.archlinux.org wiki.archlinux.org wiki.gentoo.org unix.stackexchange.com stackoverflow.com superuser.com www.reddit.com kyun.host panel.ihostart.com virt.crunchbits.com; do
- if [ "$resolved" ]; then
+ if [ "$resolved" ] && ! [ "$1" ]; then
# awk substr and length:
# https://stackoverflow.com/a/14840991
# https://unix.stackexchange.com/a/305192
diff --git a/sh/upd b/sh/upd
index 892f7fa..1aa2cf7 100755
--- a/sh/upd
+++ b/sh/upd
@@ -12,13 +12,17 @@ all () {
if [ "$hostname" = xyzib ]; then
qb
fi
+ # After linux upgrade, if not reboot, plug in external HDD will not be
+ # detected, not sure about USD thumb drive tho. monthly_misc() needs to
+ # plug in USD thumb drive, so monthly_misc() needs to run before pac()
+ # which is in fast().
+ monthly_misc
fast
clean
# don't run reflector if it is pp or insp, because they all VPN to ba now
if ! { [ "$hostname" = xyzpp ] || [ "$hostname" = xyzinsp ];}; then
refl
fi
- monthly_misc
if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
userjs
fi
@@ -163,11 +167,14 @@ clean () {
# basic daily stuff
fast () {
- pac
- misc
+ # After linux upgrade, if not reboot, plug in external HDD will not be
+ # detected. backup() needs to plugin external HDD, so backup() needs to run
+ # before pac()
if [ "$hostname" = xyzinsp ] || [ "$hostname" = xyzpp ]; then
backup
fi
+ pac
+ misc
}
userjs () {