From cb18564c4d4df22ed7764cf76cc883dccba85de8 Mon Sep 17 00:00:00 2001 From: David Gaffield Date: Thu, 25 Jan 2024 16:28:37 -0700 Subject: [PATCH] Fix misspelling --- .../Linux - remote-assist - Installation script.md | 2 +- PowerShell/JumpCloud Commands Gallery/commands.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerShell/JumpCloud Commands Gallery/Linux Commands/Linux - remote-assist - Installation script.md b/PowerShell/JumpCloud Commands Gallery/Linux Commands/Linux - remote-assist - Installation script.md index fb71e826b..a1facb4ef 100644 --- a/PowerShell/JumpCloud Commands Gallery/Linux Commands/Linux - remote-assist - Installation script.md +++ b/PowerShell/JumpCloud Commands Gallery/Linux Commands/Linux - remote-assist - Installation script.md @@ -194,7 +194,7 @@ main #### Description -This script installs rempte assist application on the Linux machine. +This script installs remote assist application on the Linux machine. #### _Import This Command_ diff --git a/PowerShell/JumpCloud Commands Gallery/commands.json b/PowerShell/JumpCloud Commands Gallery/commands.json index 1921cd115..6d116b930 100644 --- a/PowerShell/JumpCloud Commands Gallery/commands.json +++ b/PowerShell/JumpCloud Commands Gallery/commands.json @@ -102,7 +102,7 @@ "type": "linux", "command": "#!/usr/bin/env bash\n################################################################################\n# This script will install remote assist application on a Linux device\n################################################################################\n\n# Disable following external sources\n# shellcheck disable=SC1091,SC1090,SC2059\n\nif [[ \"${UID}\" != 0 ]]; then\n (>&2 echo \"Error: $0 must be run as root\")\n exit 1\nfi\n\nset -u\n\n# set the RAA version string in the below variable before running the script.\n# the example format of version: v0.75.0\ndeclare -t raa_version=\"\"\n\nif [[ \"$raa_version\" == \"\" ]]; then\n echo \"'raa_version' need to be provided in the script (eg. v0.75.0)\"\n exit 0\nfi\n\ntmp_dir=$(mktemp -d)\n\ndeclare -r timeout=900\ndeclare -r max_retries=4\ndeclare -r max_retry_time=3600\n\ndeclare -r tmp_dir\n\ndeclare -r pub_key_name=\"jumpcloud-remote-assist-agent.gpg.asc\"\ndeclare -r raa_binary_name=\"jumpcloud-remote-assist\"\n\ndeclare -r install_prefix=\"/opt/jc_user_ro\"\ndeclare -r apps_path=\"/usr/share/applications\"\ndeclare -r raa_directory=\"${install_prefix}/jumpcloud-remote-assist\"\ndeclare -r raa_desktop_file=\"${raa_directory}/resources/build-app/linux/jumpcloud-remote-assist.desktop\"\ndeclare -r uninstaller_path=\"${install_prefix}/bin/uninstall-${raa_binary_name}\"\ndeclare -r raa_service_install_file=\"${raa_directory}/resources/build-app/linux/raasvc-install.sh\"\n\ndeclare -r remote_pub_key_url=\"https://jumpcloud-windows-agent.s3.amazonaws.com/production/remote-assist/jumpcloud-remote-assist-agent.gpg.asc\"\ndeclare -r remote_tgz_url=\"https://jumpcloud-windows-agent.s3.amazonaws.com/production/remote-assist/versions/${raa_version}/jumpcloud-remote-assist-agent_x86_64.tar.gz\"\n\ndeclare -r old_pub_key_fingerprint=\"83463C47A34D1BC1\"\ndeclare -r pub_key_fingerprint=\"8C31C1376B37D307\"\ndeclare -r owner_trust=\"C2122200660347DB094054808C31C1376B37D307:6:\"\ndeclare -r tgz_name=\"jumpcloud-remote-assist-agent.tar.gz\"\ndeclare -r sig_name=\"${tgz_name}.zig\"\n\ndeclare -r local_pub_key_path=\"${tmp_dir}/${pub_key_name}\"\ndeclare -r local_tgz_tmp_path=\"${tmp_dir}/${tgz_name}\"\ndeclare -r local_sig_tmp_path=\"${tmp_dir}/${sig_name}\"\n\ndeclare -r remote_sig_url=\"${remote_tgz_url}.sig\"\n\nfunction cleanup() {\n rm -rf \"${tmp_dir}\"\n}\n\nfunction download_single_file() {\n local url=${1}\n local local_file=${2}\n\n echo \"Downloading ${url}\"\n\n curl_output=$(curl -v --trace-time \\\n --max-time \"${timeout}\" --retry \"${max_retries}\" \\\n --retry-max-time \"${max_retry_time}\" \\\n --output \"${local_file}\" \"${url}\" -C - 2>&1)\n\n rc=$?\n if [[ \"$rc\" != \"0\" ]]; then\n echo \"Failed to download ${url}\"\n echo \"${curl_output}\"\n exit ${rc}\n fi\n}\n\nfunction remove_old_pub_key() {\n if gpg --list-keys | grep -q \"${old_pub_key_fingerprint}\"; then\n echo \"Removing old public key ${old_pub_key_fingerprint}\"\n gpg --batch --yes --delete-key \"${old_pub_key_fingerprint}\"\n fi\n}\n\nfunction install_pub_key() {\n remove_old_pub_key\n\n output=$(gpg --list-keys | grep \"${pub_key_fingerprint}\")\n if [[ \"${output}\" == \"\" ]]; then\n download_single_file \"${remote_pub_key_url}\" \"${local_pub_key_path}\"\n echo \"Importing public key ${pub_key_fingerprint}\"\n gpg --import \"${local_pub_key_path}\"\n echo \"${owner_trust}\" | gpg --import-ownertrust\n fi\n}\n\nfunction verify_signature() {\n local sig=\"${1}\"\n local tgz=\"${2}\"\n gpg --verify \"${sig}\" \"${tgz}\" 2>&1\n}\n\nfunction download_files() {\n download_single_file \"${remote_tgz_url}\" \"${local_tgz_tmp_path}\"\n download_single_file \"${remote_sig_url}\" \"${local_sig_tmp_path}\"\n if ! verify_signature \"${local_sig_tmp_path}\" \"${local_tgz_tmp_path}\"; then\n echo \"Unable to verify signature for ${tgz_name}\"\n exit 1\n fi\n}\n\nfunction uncompress_tarball() {\n echo \"Installing new RAA\"\n mkdir -p \"${install_prefix}\"\n chmod 755 \"${install_prefix}\"\n tar zxf \"${local_tgz_tmp_path}\" -C \"${install_prefix}\"\n}\n\nfunction remove_old_raa_dir() {\n if [[ -d \"${raa_directory}\" ]]; then\n echo \"Removing old RAA\"\n rm -rf \"${raa_directory}\"\n fi\n}\n\nfunction kill_running_raa_instance() {\n local pid_list\n pid_list=$(pidof \"${raa_binary_name}\")\n for raa_pid in ${pid_list}; do\n echo \"Stopping remote assist process ${raa_pid}\"\n kill \"${raa_pid}\"\n done\n}\n\nfunction install_new_raa() {\n remove_old_raa_dir\n uncompress_tarball\n}\n\nfunction install_desktop_file() {\n echo \"Installing desktop shortcut\"\n if [[ -d \"${apps_path}\" ]]; then\n cp \"${raa_desktop_file}\" \"${apps_path}\"\n if command -v \"update-desktop-database\" &>/dev/null; then\n update-desktop-database\n fi\n fi\n}\n\nfunction install_raasvc_file() {\n echo \"Installing raasvc and raal service\"\n if [[ -f \"${raa_service_install_file}\" ]]; then\n chmod +x \"${raa_service_install_file}\"\n /bin/bash \"${raa_service_install_file}\"\n fi\n}\n\nfunction install_uninstall_script() {\n mkdir -p \"$(dirname \"${uninstaller_path}\")\"\n cat > \"${uninstaller_path}\" <<'EOF'\n{{template \"linuxUninstall.tmpl.sh\" .}}\nEOF\n chmod -x \"${uninstaller_path}\"\n chmod 700 \"${uninstaller_path}\"\n}\n\nfunction main() {\n trap cleanup EXIT\n install_pub_key\n download_files\n kill_running_raa_instance\n install_new_raa\n install_desktop_file\n install_raasvc_file\n install_uninstall_script\n}\n\nmain", "link": "https://github.com/TheJumpCloud/support/blob/master/PowerShell/JumpCloud%20Commands%20Gallery/Linux%20Commands/Linux%20-%20remote-assist%20-%20Installation%20script.md", - "description": "This script installs rempte assist application on the Linux machine." + "description": "This script installs remote assist application on the Linux machine." }, { "name": "Mac - Disable Local User | v1.0 JCCG",