diff --git a/deploy.sh b/deploy.sh index 34a4837..d935ce6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -268,9 +268,9 @@ disk_config_generation() { TMPFILE="/tmp/nixos-deployment-temp-file" ### --> Get disk information - DISK_DETAILS=$(ssh_to_host " + DISK_DETAILS=$(ssh_to_host 'bash -s' < " -TMPFILE="$TMPFILE" +TMPFILE=\"/tmp/nixos-deployment-temp-file\" # Declare arrays and variables HDD=1 @@ -291,7 +291,7 @@ for DISK in \$(lsblk -x SIZE -d -n -o NAME); do fi # Disk health - if [[ \$(echo "$REMOTE_PASS" | sudo -S smartctl -H /dev/\$DISK 2>/dev/null | grep 'self-assessment' | awk '{print \$6}') == \"PASSED\" ]]; then + if [[ \$(echo \"$REMOTE_PASS\" | sudo -S smartctl -H /dev/\$DISK 2>/dev/null | grep 'self-assessment' | awk '{print \$6}') == \"PASSED\" ]]; then DISK_HEALTH+=(\"PASSED\") else DISK_HEALTH+=(\"N/A\")