]> gitweb.morketsmerke.org Git - idle.git/commitdiff
Dodanie funkcji 'idle-exec-command' - skrypt 'idle.sh'
authorxf0r3m <jakubstasinski@protonmail.com>
Mon, 7 Aug 2023 17:18:52 +0000 (19:18 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Mon, 7 Aug 2023 17:18:52 +0000 (19:18 +0200)
idle.sh

diff --git a/idle.sh b/idle.sh
index c3362835c1a6a36cacc389dc2e5604e3a7efeb8b..d8bfed30f2227433908deb344c7599bad47b5ab7 100644 (file)
--- a/idle.sh
+++ b/idle.sh
@@ -156,3 +156,11 @@ function idle-exec-shell() {
   defaultContainerUser=$(grep ";${containerName};" $DATABASE | cut -d ";" -f 5);
   lxc exec $containerName -- sudo --login --user $defaultContainerUser;
 }
+
+function idle-exec-command() {
+  containerName=$1;
+  shift;
+  defaultContainerUser=$(grep ";${containerName};" $DATABASE | cut -d ";" -f 5);
+  lxc exec $containerName -- sudo --login --user $defaultContainerUser $@;
+}
+