#!/bin/bash

source /opt/scripts_local/script_logging.sh "$(basename $0)"
source /opt/scripts_local/shared_functions.sh


if ( _isx86 ); then
  if ! [ -f /usr/bin/lnav ]; then
    echo "Server is x86 and has not lnav installed"
    sudo rsync -avP  -e "ssh -o StrictHostKeyChecking=no" root@ket.swallow-grue.ts.net:/mypool1/data/shared/usr/bin/lnav /usr/bin/lnav
    sudo chown root:root /usr/bin/lnav
    sudo chmod +x /usr/bin/lnav
    echo "Lnav version $(lnav --version) is installed"
  fi
fi