From a2835b2358bc5365900e469cdcbfc1939d430318 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 25 Jul 2022 12:27:55 -0500 Subject: [PATCH] new script for rudimentary http server --- home/private_bin/executable_ssh-serve-files | 60 +++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 home/private_bin/executable_ssh-serve-files diff --git a/home/private_bin/executable_ssh-serve-files b/home/private_bin/executable_ssh-serve-files new file mode 100644 index 0000000..eadac92 --- /dev/null +++ b/home/private_bin/executable_ssh-serve-files @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +#colors +help() { + cat <>$DIR" + +# first change directory in case python<3.7 +ssh -tL localhost:$PORT:localhost:$PORT $USER_HOST \ + "cd $DIR && python3 -m http.server $PORT"