1
0
mirror of https://github.com/vdm-io/dynamic-ip.git synced 2024-10-31 18:52:38 +00:00

fixed repo url

This commit is contained in:
Llewellyn van der Merwe 2017-07-22 00:25:05 +01:00
parent da12949b2b
commit b22e11b3cc
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
2 changed files with 16 additions and 16 deletions

View File

@ -29,7 +29,7 @@ ACTION="getip"
############## CONFIG ########## ############## CONFIG ##########
############## ########## ############## ##########
############################################################## ##############################################################
REPOURL="https://raw.githubusercontent.com/vdm-io/quick/master/" REPOURL="https://raw.githubusercontent.com/vdm-io/dynamic-ip/master/"
VDMIPSERVER="https://www.vdm.io/$ACTION" VDMIPSERVER="https://www.vdm.io/$ACTION"
############################################################## ##############################################################
@ -85,12 +85,12 @@ function setCron () {
echo "" >> $VDMHOME/$ACTION.cron echo "" >> $VDMHOME/$ACTION.cron
fi fi
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT | bash"* ]]; then
echo "@reboot curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set
if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT | bash"* ]]; then
echo "*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron echo "*/7 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron
fi fi
# set the user cron # set the user cron
crontab -u $VDMUSER $VDMHOME/$ACTION.cron crontab -u $VDMUSER $VDMHOME/$ACTION.cron
@ -137,16 +137,16 @@ function setAccessToken () {
} }
function getIP () { function getIP () {
# get this server IP # # get this server IP
IPNOW="$(dig +short myip.opendns.com @resolver1.opendns.com)" # IPNOW="$(dig +short myip.opendns.com @resolver1.opendns.com)"
# store the IP in the HOSTNAME file # # store the IP in the HOSTNAME file
echo -n "Setting/Update the Dynamic IP..." # echo -n "Setting/Update the Dynamic IP..."
resultUpdate=$(curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" -H "VDM-KEY: $VDMSERVERKEY" -H "VDM-IP: $IPNOW" --silent $VDMIPSERVER) # resultUpdate=$(curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" -H "VDM-KEY: $VDMSERVERKEY" -H "VDM-IP: $IPNOW" --silent $VDMIPSERVER)
if [[ "$resultUpdate" != "$TRUE" ]]; then # if [[ "$resultUpdate" != "$TRUE" ]]; then
echo " >> YOUR SERVER KEY IS INCORRECT! << $resultUpdate" # echo " >> YOUR SERVER KEY IS INCORRECT! << $resultUpdate"
exit 1 # exit 1
fi # fi
echo "Done" # echo "Done"
} }
############################################################## ##############################################################

View File

@ -29,7 +29,7 @@ ACTION="setip"
############## CONFIG ########## ############## CONFIG ##########
############## ########## ############## ##########
############################################################## ##############################################################
REPOURL="https://raw.githubusercontent.com/vdm-io/quick/master/" REPOURL="https://raw.githubusercontent.com/vdm-io/dynamic-ip/master/"
VDMIPSERVER="https://www.vdm.io/$ACTION" VDMIPSERVER="https://www.vdm.io/$ACTION"
############################################################## ##############################################################