From b22e11b3cc0d7e83c78cc8db657ddd8174e6f180 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 22 Jul 2017 00:25:05 +0100 Subject: [PATCH] fixed repo url --- getip.sh | 30 +++++++++++++++--------------- setip.sh | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/getip.sh b/getip.sh index 942bf6d..3a9739c 100644 --- a/getip.sh +++ b/getip.sh @@ -29,7 +29,7 @@ ACTION="getip" ############## 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" ############################################################## @@ -85,12 +85,12 @@ function setCron () { echo "" >> $VDMHOME/$ACTION.cron fi # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set - if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then - echo "@reboot curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron + if [[ $currentCron != *"@reboot curl -s $VDMSCRIPT | bash"* ]]; then + echo "@reboot curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron fi # check if the @reboot curl -s $VDMSCRIPT | sudo bash is already set - if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash"* ]]; then - echo "*/7 * * * * curl -s $VDMSCRIPT $ACTION | sudo bash" >> $VDMHOME/$ACTION.cron + if [[ $currentCron != *"*/7 * * * * curl -s $VDMSCRIPT | bash"* ]]; then + echo "*/7 * * * * curl -s $VDMSCRIPT | bash" >> $VDMHOME/$ACTION.cron fi # set the user cron crontab -u $VDMUSER $VDMHOME/$ACTION.cron @@ -137,16 +137,16 @@ function setAccessToken () { } function getIP () { - # get this server IP - IPNOW="$(dig +short myip.opendns.com @resolver1.opendns.com)" - # store the IP in the HOSTNAME file - 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) - if [[ "$resultUpdate" != "$TRUE" ]]; then - echo " >> YOUR SERVER KEY IS INCORRECT! << $resultUpdate" - exit 1 - fi - echo "Done" +# # get this server IP +# IPNOW="$(dig +short myip.opendns.com @resolver1.opendns.com)" +# # store the IP in the HOSTNAME file +# 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) +# if [[ "$resultUpdate" != "$TRUE" ]]; then +# echo " >> YOUR SERVER KEY IS INCORRECT! << $resultUpdate" +# exit 1 +# fi +# echo "Done" } ############################################################## diff --git a/setip.sh b/setip.sh index ec151ba..749479e 100755 --- a/setip.sh +++ b/setip.sh @@ -29,7 +29,7 @@ ACTION="setip" ############## 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" ##############################################################