Not really, but at the end of your transfer, you could send a file ending with .ok. Have a daemon running on the remote machine that checks to see if the .ok is available then run the script and delete the .ok file.
Here's what we do
if [ -r running.txt ]; then
echo "Process is running already on $(date):"
cat running.txt
exit 1
fi
# Check for ok files every ten minutes.
found=0
counter=0
while [ $found -eq 0 -a $counter -lt 10 ]; do
if [ -r date.ok -a -r date1.ok ]; then
found=1
else
echo "date.ok & date1.ok files not found on $(date)" >> $WAIT_LOG
echo ".ok files not found on $(date)"
sleep 600
((counter=$counter+1))
fi
done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.