Skip to content

Instantly share code, notes, and snippets.

@steepzero-old
Created January 11, 2018 12:31
Show Gist options
  • Save steepzero-old/94854e01c693ed5c7cfb8a90a80d4773 to your computer and use it in GitHub Desktop.
Save steepzero-old/94854e01c693ed5c7cfb8a90a80d4773 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILE_IN=$HOME"/www/neoinsant.f5-test.ru/cron/users/users.json"
SECRET_KEY="123456798654321"
UPDATE_URL="http://f5-test.ru/cron/vip_user_upload.php?secret=$SECRET_KEY"
DATE=`date +%F_%H-%M-%S`
LOG_FILE=$HOME"/www/f5-test.ru/cron/users/log/vip_users-$DATE.log"
if [ -e "$FILE_IN" ]
then
echo "Executing query..." >> $LOG_FILE
curl $UPDATE_URL >> $LOG_FILE
else
echo "$FILE_IN does not exist" >> $LOG_FILE
exit 404
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment