From 8d554a5ce1e8d41d6d494b28ce9801b15a0acadd Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Mon, 5 Aug 2024 23:19:41 +0200 Subject: [PATCH] getting the bootstrap icons (not checking them in). Split up instructions for working with agents. --- getbootstrapicons.sh | 17 +++++++++++++++++ pkg/server/templates/usage.templ | 19 ++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100755 getbootstrapicons.sh diff --git a/getbootstrapicons.sh b/getbootstrapicons.sh new file mode 100755 index 0000000..082513f --- /dev/null +++ b/getbootstrapicons.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cd $( dirname $0 ) + +set -e +tmpfile=/tmp/icons.zip.$$ +trap "rm -f $tmpfile. exit" EXIT + +curl --fail-with-body -L https://github.com/twbs/icons/releases/download/v1.11.3/bootstrap-icons-1.11.3.zip > $tmpfile + +rm -rf static/icons +mkdir -p static/icons + +cd static/icons +jar xvf "$tmpfile" +mv bootstrap-icons*/* . + diff --git a/pkg/server/templates/usage.templ b/pkg/server/templates/usage.templ index 37ae488..9cc3298 100644 --- a/pkg/server/templates/usage.templ +++ b/pkg/server/templates/usage.templ @@ -90,32 +90,41 @@ templ AgentUsage(access models.ConvergeAccess, usageInputs UsageInputs) {

Working with the agent

if usageInputs.RemoteShells[BASH] { - +
+ # cd back to the agent directory
cd $agentdir
-
+
+ # prevent logout when last user exits
touch $agentdir/.hold
- +
+
} if usageInputs.RemoteShells[CMD] { +
# cd back to the agent directory
cd %agentdir%
-
+
+ # prevent logout when last user exits
echo > %agentdir%\.hold
+
} if usageInputs.RemoteShells[POWERSHELL] { +
# cd back to the agent directory
cd $env:agentdir
-
+
+ # prevent logout when last user exits
$null > $env:agentdir\.hold
+
} if usageInputs.RemoteShells[CMD] || usageInputs.RemoteShells[POWERSHELL] {