#!/bin/sh

#
# This script is called with CLI arguments: DIR ACTION
# DIR - mount point of the newly (u)mounted dir
# ACTION - ADD or REMOVE

DIR=$1
ACTION=$2

say()
{
  echo "$@"
  logger "$@"
}


add()
{

  if [ ! -d $DIR ]; then
    say "$DIR does not exist. nothing to do"
    exit 0
  fi
  
  #
  # Add your custom logic to handle mounting of storage volumes...


  exit 0
}


case "$ACTION" in
ADD)
  add
  ;;

REMOVE)
  #
  # Add your own logic to handle removal of storage volumes...
  exit 0
  ;;

*)
  say "Invalid arguments: " "$@"
  exit 1
  ;;
esac

