aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm
diff options
context:
space:
mode:
authorAstound <kirito@disroot.org>2024-08-03 23:24:59 +0800
committerAstound <kirito@disroot.org>2024-08-03 23:26:52 +0800
commit1996a500fe8709b8580ecaab305888c1376cc0aa (patch)
tree699c49c809e6232e8a2b48c00d9c98ff73c9f4e4 /hyperterm
parent00c6040f1a8aad2b37627b4179ba517e5faba486 (diff)
downloadhyperterm-1996a500fe8709b8580ecaab305888c1376cc0aa.tar.lz
hyperterm-1996a500fe8709b8580ecaab305888c1376cc0aa.tar.xz
hyperterm-1996a500fe8709b8580ecaab305888c1376cc0aa.zip
Relax ssh-agent, add support days to sagent_start, like `sagent_start 1d`
Diffstat (limited to 'hyperterm')
-rw-r--r--hyperterm/hyperterm.sha5122
-rw-r--r--hyperterm/tools/ssh-agent.sh6
2 files changed, 6 insertions, 2 deletions
diff --git a/hyperterm/hyperterm.sha512 b/hyperterm/hyperterm.sha512
index 717aa86..0a2a89a 100644
--- a/hyperterm/hyperterm.sha512
+++ b/hyperterm/hyperterm.sha512
@@ -24,4 +24,4 @@ f760432c3d76befad30588299eb2d1412d77b22fd850ffbd840c72123885d4e916a7e0b16e7048c5
fab9d339a99c7d2e1809d1c44f533523c6bfcdcc8d63c62b335ce7d4c666c8bdd7ac319316bf71f043163a3a0184e25ecfe1ee32724627424d042a05fa80ce77 ./tools/vconverter.sh
ee1d6d1f9b010318985f7154c2a9173c8f2ab6b637cd3c8d2a9b403e83470e15a273dcff326a84f035660807d7cfcf04efe5abc0495e25ae7339b8807899cf0d ./tools/listuser.sh
243e3a076f1696bde1e464b479e221876177eb98c92415a09de8dc9e8d138e88e006eb9fa441ca1ab19d260cb3fd4de82dc54feae73453e229c3a8fdab3043f0 ./tools/virtualenv.sh
-81572df762582dc63ca7ce89a0aeed645931011b0d66909d9ac6c5d34d6e16ddab6a1edd385ac9328b11bb154fb6ecbe93f15c0396a0f33f6dcf4557cb430a02 ./tools/ssh-agent.sh
+a652dc22d92c8af84215b310bcc858df1c692fdf57565ef99ada7e7d91a5844ca0f6c7751d666f553e3cf250ccbb62ac0c01849b86904252130811d38b7ad425 ./tools/ssh-agent.sh
diff --git a/hyperterm/tools/ssh-agent.sh b/hyperterm/tools/ssh-agent.sh
index 4c24ba5..e121722 100644
--- a/hyperterm/tools/ssh-agent.sh
+++ b/hyperterm/tools/ssh-agent.sh
@@ -14,7 +14,11 @@ function sshagent_start {
chmod 600 "${SSH_ENV}"
# shellcheck source=/dev/null
source "${SSH_ENV}" > /dev/null
- ssh-add -t 5d
+
+ # Set the default time to 5 days if not provided
+ local days="${1:-5d}"
+
+ ssh-add -t "$days"
printf '\e[1;36m%s\e[m\n' "succeeded"
}