Created
January 11, 2018 12:31
-
-
Save steepzero-old/94854e01c693ed5c7cfb8a90a80d4773 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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