Приложение 1

Тестовый скрипт на клиенте /opt/rubackup/scripts/
#!/bin/bash
#echo "RuBackup test script"

if [ "$#" -gt 1 ]
then
  if [ "$1" = "before" ]
  then
    echo "RuBackup script handler BEFORE started"
    #echo "Handler body"
    echo "RuBackup script handler BEFORE finished"
    exit 0;
  fi

  if [ "$1" = "after" ]
  then
    echo "RuBackup script handler AFTER started"
    #echo "Handler body"
    echo "RuBackup script handler AFTER finished"
    exit 0;
  fi

  if [ "$1" = "error" ]
  then
    echo "RuBackup script handler ERROR started"
    #echo "Handler body"
    echo "RuBackup script handler ERROR finished"
    exit 0;
  fi
else
  echo "Using: $0 before|after|error resource opt_args"
fi