we need a small shell script (for backup) which can do this things:
i need 4 variables to edit on the top of the script:
$mount_point = /mnt/somthing
$max_duration = 480 (minutes)
$my_command = rsync with a few options
i will start the script with a cron job every night.
1. the script should first check the mount. if nothing is mounted as declared i will get a error message per email.
2. if mount is ok, the script should start my command ($my_command).
4. if the script runs longer then $max_duration it should stop $my_command or kill? with email to $email_address
5. if the script is finished before $max_duration it should make a email with a success message with the time which has it taked to to his job.