--- /dev/null
+#!/bin/bash
+
+function help() {
+ echo 'idle-clic - IDLE CLI Client';
+ echo '@ 2023 morketsmerke.org';
+ echo;
+ echo 'IDLE commands:';
+ echo ' list-distros - listing available distributions on this server';
+ echo ' shell <distro> - running up the shell in given container';
+ echo ' check-command - checking there is a given command in any container';
+ echo ' apropos <keyword> - return list of commands with short description';
+ echo ' match to given keyword';
+ echo ' pkgsearch <keywords> - searching there is package installed or ready';
+ echo ' to install match to given keywords';
+ echo;
+ echo 'Usage:';
+ echo ' $ idle-clic list-distros';
+ echo ' $ idle-clic shell rocky9';
+ echo ' $ idle-clic check-command netstat';
+ echo ' $ idle-clic apropos zip';
+ echo ' $ idle-clic pkgsearch "intel sound"';
+ echo;
+ echo 'IDLE Configuration:';
+ echo 'In ~/.idle/.idle.conf file (example of this file: /usr/share/idle/idle.conf)';
+ echo ' RUSER="user";';
+ echo ' IDLESERVER="idle.example.org";';
+ echo ' SSH_OPTS="-p 10022 -i ~/id_rsa"; #OPTIONAL';
+}
+
+if [ -f ~/.idle/idle.conf ]; then
+ source ~/.idle/idle.conf;
+ echo "IDLE Server response:";
+ ssh ${SSH_OPTS} ${RUSER}@${IDLESERVER} "idle-clis $@";
+ if [ $? -eq 1 ]; then help; exit 1; fi
+else
+ echo "There is no IDLE config file. Exiting...";
+ help;
+ exit 1;
+fi
--- /dev/null
+#!/bin/bash
+
+if [ $# -gt 0 ]; then
+ source /usr/share/local/idle;
+ command=$1;
+ shift;
+ case $command in
+ "list-distros") idle-list-containers; break;;
+ "shell") idle-exec-shell $2; exit;;
+ "check-command") idle-exec-command $2; exit;;
+ "apropos") idle-apropos $@; exit;;
+ "pkgsearch") idle-pkg-search $@; break;;
+ esac
+else
+ exit 1;
+fi