Jump to content

UnknownWitcher

Members
  • Posts

    1
  • Joined

  • Last visited

UnknownWitcher's Achievements

Noob

Noob (1/14)

1

Reputation

  1. You could check the unraid version then define the location based on the minimum version required for the change. mover_path="/usr/local/bin/" if awk "BEGIN {exit !($(cat cat /etc/unraid-version | grep -Po '([0-9]+\.?)+') >= 6.12.6)}"; then mover_path="/usr/local/sbin/" fi if [[ ! -f "${mover_path}/mover.old" ]]; then mv "${mover_path}/mover" "${mover_path}/mover.old"; fi or run a function to return a boolean if changes are required for multiple parts of the script. function min_unraid_version { local min_version="6.12.6" if awk "BEGIN {exit !($(cat cat /etc/unraid-version | grep -Po '([0-9]+\.?)+') >= $min_version)}"; then true; return fi false } if min_unraid_version; then echo "/usr/local/sbin/" else echo "/usr/local/bin/" fi
×
×
  • Create New...