diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:04:39 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-20 12:04:39 +0200 |
commit | e5eb7f627f4632dab17e0cc0f727cb9b1f70d8a1 (patch) | |
tree | 75c7f8560539303e4a5c1f93241a1e8912bad4cc /config/essentials/shell/functions.sh | |
parent | 05e1216b45340702f82a4946002015a05cebe9b1 (diff) | |
parent | 947f7df73f16981f170265a64a964142fc617023 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r-- | config/essentials/shell/functions.sh | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 976db1e..1b69fbd 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -306,7 +306,7 @@ gdown () { } # toggle wireguard vpn on $1 -> interface -wgtoggle() { +wgt() { d="${1:-wg0}" ip -br a | awk '{print $1}' | grep "$d" > /dev/null && doas wg-quick down "$d" || @@ -318,17 +318,10 @@ serve() { if [ "$1" ] then logn "Serving $1" - docker container run \ - --rm \ - --volume "$(readlink -f "$1")":/data \ - --publish 80:5000 sigoden/dufs /data + dufs "$1" else - logn "Receiving files.." - docker container run \ - --rm \ - --volume /tmp/data:/data \ - --publish 80:5000 sigoden/dufs /data --allow-upload + dufs /tmp/data --alow-upload fi } |