Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding commands to ftp

Status
Not open for further replies.

jping45

Technical User
Aug 22, 2001
49
US
Is there a way to configure ftp to allow an ftp user to run a script on the remote host?
 
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

Mike --
| Mike Nixon
| Unix Admin
| ----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top