mkorthof / freenom-script Goto Github PK
View Code? Open in Web Editor NEWFreenom.com Domain Renewal and Dynamic DNS script
License: GNU General Public License v3.0
Freenom.com Domain Renewal and Dynamic DNS script
License: GNU General Public License v3.0
I got the following error by running : ./freenom.sh -u xxxxxx.com
./freenom.sh -u example.ml
DEBUG: conf scriptConf=./freenom.conf
DEBUG: args 1=-u 2=example.ml 3= 4= 5= 6=
DEBUG: args freenom_domain_name=example.tk freenom_domain_id=1042465653 freenom_subdomain_name=
DEBUG: action freenom_update_ip=1 freenom_update_force=0 freenom_list_records=0
DEBUG: action freenom_list=0 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: getip i=0 current_ip=
DEBUG: getip i=1 current_ip=
DEBUG: getip i=2 current_ip=172.68.250.18
DEBUG: func_getRec raw i=0 example.TK recNum=0 recName=example.TK
DEBUG: func_getRec raw i=1 MAIL recNum=1 recName=MAIL
DEBUG: func_getRec raw i=2 example.TK recNum=2 recName=example.TK
DEBUG: func_getRec raw i=3 MX01 recNum=3 recName=MX01
recMatch equal to 0
DEBUG: update_ip recMatch=0 recNum=3 recName= recordKey=addrecord[4] dnsAction=add
DEBUG: update_ip name= ttyl=3600 value=172.68.250.18
When I try to update the IP of a domain something-services.tk
it creates a new subdomain like this ervices.tk.something-services.tk
. I think it's because the -s is getting interpreted a a new argument.
Hello,
nice work. Sadly, even listing the own domains doesn't show any entry. I tried other scripts, too - but they didn't work for me as well. Did freenom recently changed their website?
No Domains are listed, and no errors or other entries found in logfile...
>>> /usr/local/bin/freenom.sh -l
Listing Domains and ID's...
>>> cat /var/log/freenom/freenom.log
>>> bash --version
GNU bash, Version 5.0.11(1)-release (x86_64-pc-linux-gnu)
Hello. I git-cloned the script on my Debian server in a temp dir. I followed the instructions. I've made the changes requested in the freenom.conf file, like email and password. But when I try to call one of the examples like "./freenom.sh -r mydomain.tk" it says "Error: setting "freenom_email" is missing in config". But I did compile it as requested and uncommented out. What am possible doing wrong?
Hello,
I want to only update subdomains and not the domains itself, how can I do that ?
Thanks,
P0luX,
Hello,
Is there a way to update the ip address on all my domains once and for all ? Or a param in the config that allow us to specify a list of domains to update?
Because otherwise I have to make as much commands as I have domains.
Regards
I use Freenom and have registered domains using the Social Sign-In. I did face some errors which I could solve myself. For example my password contained a special character in the start so I used ' '
quotes instead of " "
but now I am facing this issue. I have added the email and password in the freenom.config file and it gives me the following output.
$ sudo freenom.sh -l
Warning: no MTA found, cant send email
Listing Domains and ID's...
Error: Login failed, incorrect details
I am not sure if this error is happening because I use a Social Sign-In account or because I did something wrong could someone please help me.
/usr/local/bin/freenom.sh -u ****8.tk
result:Error: Could not get current local ip address
Hi - Thanks for a wonderful script which was working for me earlier this year (Feb 2021).
I now get this error every time. It appears to be a curl error so I reinstalled curl, but no joy.
I tried this based on your diagnostic section:
$ curl -%ipv% -A %agent% -m 10 -s https://diagnostic.opendns.com/myip
but get this:
curl: option -%ipv%: is unknown
Please help. This program is doing great things!!
I am on a Ubuntu machine:
Linux 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I have 3 subdomains i want to update and i can't seem to find any way to do so with systemd, anything you can suggest?
So ive followed all the instructions and configured it and did all the sudo make install. but when i run sudo freenom.sh -u natur-gesund.tk
it gives me a warning Warning: no MTA found, cant send email
waits a bit (does something) and then the ip isnt updated... when i manully curl the ip servers to get the ip it works... and -l lists all the domains. I dont know why and have to have it fixed in 3 days.
By the way: its running on a pi.
Hello,
is it possible to update the A-record with the ip for all domains?
How do I set up a systemd-service for this?
In conf-File, there is option
freenom_update_all="1" # [0/1] arg "-a"
But freenom.sh -h doesnt know such an option/opportunity, for example for running it once
====================================
Do you know that the script fails when one of these options set to 1:
freenom_list="0" # [0/1] arg "-l"
freenom_list_renewals="0" # [0/1] args "-l -d"
freenom_list_records="0" # [0/1] arg "-z"
--> in freenom.log there is only a entry like the following one if one of the options is set to 1
[Sa 27. Aug 23:47:24 CEST 2022] [17324] Start: Domain renewal
or
[Sa 27. Aug 23:48:31 CEST 2022] [17324] Error: Domain renewal - No Domain ID ""
Update the script version and now I have the following error.
Also try changing the conf file Path.
~# freenom.sh -u surink.tk -s glpi -c /var/webs/z-Scripts/freenom.conf
DEBUG: conf scriptConf=/var/webs/z-Scripts/freenom.conf
/usr/local/bin/freenom.sh: line 184: [: : integer expression expected
/usr/local/bin/freenom.sh: line 196: [: : integer expression expected
DEBUG: getDomArgs d_args=-u surink.tk -s glpi arg_domain_name= arg_domain_id=
DEBUG: getDomArgs arg_subdomain_name=glpi
/usr/local/bin/freenom.sh: line 216: [: : integer expression expected
DEBUG: args 1=-u 2=surink.tk 3=-s 4=glpi 5=-c 6=/var/webs/z-Scripts/freenom.conf 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/var/log/freenom freenom_out_mask=freenom out_path=/var/log/freenom/freenom
DEBUG: opts/conf freenom_domain_name= freenom_domain_id= freenom_subdomain_name=glpi
DEBUGL opts/conf freenom_static=ip=
DEBUG: action freenom_update_ip=1 freenom_update_force=0 freenom_update_manual= freenom_update_all=
DEBUG: action freenom_list_records=0 freenom_list=0 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
/usr/local/bin/freenom.sh: line 501: [: : integer expression expected
/usr/local/bin/freenom.sh: line 507: [: : integer expression expected
/usr/local/bin/freenom.sh: line 520: [: : integer expression expected
Line 39 in d5c9a61
In this commit, the script checks the $freenom_oldcurl_force before actually source the conf file. As a result, the option will never take effect. I was looking to make a pull request, but due to the complexity of the script I am not sure the correct place to put the option checking though.
Hi there, I have the following on /etc/cron.d/freenom
*/10 * * * * root bash '/usr/local/bin/freenom.sh -u domain.name -s www'
freenom.log, freenom.ip are not created in /var/log/
syslog shows the following:
Mar 31 17:45:01 hostname CRON[9789]: (root) CMD (bash '/usr/local/bin/freenom.sh -u domain.name -s www')
Mar 31 17:45:02 hostname sendmail[9793]: x2VGj2VA009793: from=root, size=400, class=0, nrcpts=1, msgid=[email protected], bodytype=8BITMIME, relay=root@localhost
Mar 31 17:45:02 hostname sm-mta[9794]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1.2, verify=NOT, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Mar 31 17:45:02 hostname sendmail[9793]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Mar 31 17:45:02 hostname sm-mta[9794]: x2VGj2ti009794: from=[email protected], size=652, class=0, nrcpts=1, msgid=[email protected], bodytype=7BIT, proto=ESMTPS, daemon=MTA-v4, relay=localhost [127.0.0.1]
Mar 31 17:45:02 hostname sendmail[9793]: x2VGj2VA009793: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30400, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x2VGj2ti009794 Message accepted for delivery)
Mar 31 17:45:02 hostname sm-mta[9795]: x2VGj2ti009794: to=[email protected], ctladdr=[email protected] (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30927, dsn=2.0.0, stat=Sent
Same results with:
*/10 * * * * root bash -c 'sleep $((RANDOM % 15))m; /usr/local/bin/freenom.sh -u example.com'
Running the script manually works.
Am I doing something wrong?
I am a newbie here don't know how to produce logs exactly.
I set up freenom.sh with cron to update dynamic ip periodically on my home server. Recently I observe when the dynamic ip changes, freenom.sh does not update the existing A record with the new ip. Instead, it adds a new A record with the new ip, leave the old A record untouch. As a result, there are both new and old records on the DNS server which causing ambiguous result.
Example:
DNS record:
example.com A 120.*.*.11
Dynamic ip changes to 120.*.*.22
Do operation: freenom.sh -u example.com
Expected result:
DNS record:
example.com A 120.*.*.22
Actual result:
DNS record:
example.com A 120.*.*.22
example.com A 120.*.*.11
The dns record I check it directly from the freenom client area webpage. So it could not be the problem with my local dns.
Adding https://letsencrypt.org/ and https://certbot.eff.org/ to the application should make HTTPS easy.
Have verified my login details several times but still getting this error:
Error: Login failed, incorrect details
I saw #37 and manually upgraded my curl to 7.75 however I am still getting this issue.
Please help!
Thanks!
when running the script i get Error: Domain details - httpcode 504 (try 2/3)
is there anything I can do to resolve?
When i run the script with "freenom.sh -l" i have an error.
Error: Login - token failure (curl error code: 127)
I'm sure the email and the password are correct.
Another thing, if i try to go to this page "https://api.freenom.com/v2/domain/list" i got a dialog box to log in but it doesn't work. I can't login. Maybe it's the same reason why i got an error with your script...
Listing domains without renewal details seems to work fine:
$ ./freenom.sh -l
Listing Domains and ID's...
[01] Domain: ...
But adding -d
results in a sed error:
$ ./freenom.sh -l -d
Listing Domains and ID's with renewal details, this might take a while...
sed: -e expression #3, char 9: unterminated address regex
I've tried this with GNU sed versions 4.2.1 and 4.9, and it's the same error with both versions.
Pretty much title;
Would love to see this made for easy deployment :D
I got the following from debug:
./freenom.sh -u example.ml
DEBUG: conf scriptConf=./freenom.conf
DEBUG: args 1=-u 2=example.ml 3= 4= 5= 6=
DEBUG: args freenom_domain_name=example.tk freenom_domain_id=1042465653 freenom_subdomain_name=
DEBUG: action freenom_update_ip=1 freenom_update_force=0 freenom_list_records=0
DEBUG: action freenom_list=0 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: getip i=0 current_ip=
DEBUG: getip i=1 current_ip=
DEBUG: getip i=2 current_ip=172.68.250.18
DEBUG: func_getRec raw i=0 example.TK recNum=0 recName=example.TK
DEBUG: func_getRec raw i=1 MAIL recNum=1 recName=MAIL
DEBUG: func_getRec raw i=2 example.TK recNum=2 recName=example.TK
DEBUG: func_getRec raw i=3 MX01 recNum=3 recName=MX01
recMatch equal to 0
DEBUG: update_ip recMatch=0 recNum=3 recName= recordKey=addrecord[4] dnsAction=add
DEBUG: update_ip name= ttyl=3600 value=172.68.250.18
While it did successfully update the IP to freenom, but the ip and the target domain is wrong.
Hi,
First, I would really thank you for that you made here, this is really awesome and useful for me.
Everything seems to work, except 'RegDate'
and 'ExpiryDate'
, that I suppose to mean no way to renew the domain in case.
Update the domain is working well anyway.
I followed all the installing instructions and steps, configured 'freenom.conf'
(fill my ID domain as well), also schedule it through systemd
(I let you know I'm on Ubuntu, it doesn't work at first, I needed to add:
[Install]
WantedBy=multi-user.target
at the end of the service file and place services and timers files in '/lib/systemd/system/'
create symlinks to '/etc/systemd/system'
and '/etc/systemd/system/timers.target.wants/'
).
I've also checked my curl version, anyway I'm on Ubuntu 20.04 so no surprises...
When I'm enabling debug mode in the config file, that give me:
john@computer:~$ freenom.sh -l
DEBUG: debug=1 c_args=
DEBUG: conf scriptConf=/usr/local/etc/freenom.conf
Listing Domains and ID's...
DEBUG: args debug=1 c_args=-s
DEBUG: args 1=-l 2= 3= 4= 5= 6= 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/var/log/freenom freenom_out_mask=freenom out_path=/var/log/freenom/freenom
DEBUG: opts/conf freenom_domain_name=domain.tk freenom_domain_id=xxxxxxxxx freenom_subdomain_name=
DEBUGL opts/conf freenom_static=ip=
DEBUG: action freenom_update_ip=0 freenom_update_force=0 freenom_update_manual=0 freenom_update_all=0
DEBUG: action freenom_list_records=0 freenom_list=1 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: login cookie_file=/tmp/tmp.SzZt8tUfEi
DEBUG: login curl clientarea token=1d633c9beddbfe21c7e0c0a27baff35e4c378653 (r=1/3 http_code=200 errCount=0)
DEBUG: login curl dologin.php [email protected] (r=1/3 http_code=200 errCount=0)
[01] Domain: "domain.tk" Id: "xxxxxxxxxx" RegDate: "" ExpiryDate: ""
DEBUG: func_cleanup cookie_file=/tmp/tmp.SzZt8tUfEi
As you can see, it doesn't get the RegDate and the ExpiryDate.
Did Freenom change something into their API that makes your script unable to get this information?
Thank you.
Hello @mkorthof,
Thank you for your awesome script I really appreciate it!
And now with the lastes updated, I got Login failed error using the lastest commit version on the Ubuntu Core 16.04 and CentOS 7. It says Login failed, but I had everything correctly set and ran: ./freenom.sh -l -c ./freenom.conf
This is the DEBUG information I colleted by changing debug
to 1
in conf file and run ./freenom.sh -l -c ./freenom.conf
:
DEBUG: debug=1 c_args=
DEBUG: conf scriptConf=./freenom.conf
Error: logfile "/var/log/freenom/freenom.log" not writable, using "/tmp/freenom.log"
Listing Domains and ID's...
DEBUG: args debug=1 c_args=-s
DEBUG: args 1=-l 2=-c 3=./freenom.conf 4= 5= 6= 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/var/log/freenom freenom_out_mask=freenom out_path=/tmp/freenom
DEBUG: opts/conf freenom_domain_name= freenom_domain_id= freenom_subdomain_name=
DEBUGL opts/conf freenom_static=ip=
DEBUG: action freenom_update_ip=0 freenom_update_force=0 freenom_update_manual=0 freenom_update_all=0
DEBUG: action freenom_list_records=0 freenom_list=1 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: login cookie_file=/tmp/tmp.betAbXH9ww
DEBUG: login curl clientarea token=3d821214ffbc2f19130107ec2a05f5197a34e955 (r=1/3 http_code=200 errCount=0)
Login failed
DEBUG: func_cleanup cookie_file=/tmp/tmp.betAbXH9ww
BUT! If I change the freenom.sh to an older one like v2019-11-17 using exactly the same conf, OS, command line, I can get a good result without any problem so on:
DEBUG: conf scriptConf=./freenom.conf
Error: Logfile "/var/log/freenom/freenom.log" not writable, using "/tmp/freenom.log" instead
Listing Domains and ID's...
DEBUG: args 1=-l 2=-c 3=./freenom.conf 4= 5= 6= 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/var/log/freenom freenom_out_mask=freenom out_path=/tmp/freenom
DEBUG: opts/conf freenom_domain_name= freenom_domain_id= freenom_subdomain_name=
DEBUGL opts/conf freenom_static=ip=
DEBUG: action freenom_update_ip=0 freenom_update_force=0 freenom_update_manual=0 freenom_update_all=0
DEBUG: action freenom_list_records=0 freenom_list=1 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: login cookie_file=/tmp/tmp.Z5nkzxyPTN
DEBUG: login curl clientarea token=5f9db429d34a01372feeeb6a31341d29d2a291b2 (r=1/3 http_code=200 errCount=0)
DEBUG: login curl dologin.php [email protected] (r=1/3 http_code=200 errCount=0)
DEBUG: domains curl myDomainsPage (r=1/3 http_code=200 errCount=0)
DEBUG: domains curl domainDetails (r=1/3 http_code=200 errCount=0)
DEBUG: domains domainId=HIDDEN domainName=HIDDEN.tk
DEBUG: domains domainRegDate=17/03/2020 domainExpiryDate=17/03/2021
DEBUG: domains curl domainDetails (r=1/3 http_code=200 errCount=0)
DEBUG: domains domainId=HIDDEN domainName=HIDDEN.tk
DEBUG: domains domainRegDate=06/01/2020 domainExpiryDate=06/01/2021
DEBUG: domains curl domainDetails (r=1/3 http_code=200 errCount=0)
DEBUG: domains domainId=HIDDEN domainName=HIDDEN.tk
DEBUG: domains domainRegDate=08/10/2019 domainExpiryDate=08/10/2020
[01] Domain: "HIDDEN.tk" Id: "HIDDEN" RegDate: "17/03/2020" ExpiryDate: "17/03/2021"
[02] Domain: "HIDDEN.tk" Id: "HIDDEN" RegDate: "06/01/2020" ExpiryDate: "06/01/2021"
[03] Domain: "HIDDEN.tk" Id: "HIDDEN" RegDate: "08/10/2019" ExpiryDate: "08/10/2020"
So I just don't know what was going on with the new version of freenom.sh. I hope I can got your help because I don't know how to debug it 😭 .
Thank you very much!
pi@cauquepi:~ $ freenom.sh -c /home/pi/freenom.conf -l
/usr/local/bin/freenom.sh: line 28: [: : integer expression expected
/usr/local/bin/freenom.sh: line 125: source: -c: invalid option
source: usage: source filename [arguments]
Listing Domains and ID's...
/usr/local/bin/freenom.sh: line 193: [: : integer expression expected
/usr/local/bin/freenom.sh: line 223: [: : integer expression expected
^C
pi@cauquepi:~ $ freenom.sh -l -c /home/pi/freenom.conf
/usr/local/bin/freenom.sh: line 28: [: : integer expression expected
Error: invalid config specified
Listing Domains and ID's...
/usr/local/bin/freenom.sh: line 193: [: : integer expression expected
/usr/local/bin/freenom.sh: line 223: [: : integer expression expected
^C
I think no explanation is needed :P
also the integer expression expected, I think it's because of the $debug -eq 1
?
Hi , in freenom.com i have 3 A-Records but when i run
./freenom.sh -u surink.tk -s www
Delete record “SurInk.tk” and testing.surink.tk
Can you test?
The script works fine and I can list my domains. But I noticed that there isn't any script option to configure the time duration for which the domain will be renewed. The default time is 3 months on freenom.com. I went through the code and realized that the script renews the domain for 12 months most of the time. Is there any configuration to change this default time to a longer period (say 6 months or 8 months)? Or will this feature be implemented in future updates?
Keep check for records[0] and if not found addrecord , else do changes:
use regex on dnsManagementPage to extract record[$num] and name
if name = freenom_subdomain_name then dnsAction=modify (instead of add)
no match? do $num+1 and dnsAction=add
Problem:
There is one a-record one my dimain
Set up freenom.conf as need.
Run
freenom.sh -u
Result: it add new record, not update old.
Reason:
Look img1 on double red line: recName and look single redLine it eq it with empty string $sd
Solve:
Look on img2
Now it succes update ip
PS:
with default freenom_update_force="0" and freenom_update_ip="0" it (freenom.sh -u) nothing do
Hello, can you optimize this script? It doesn't work properly on openwrt, which is very useful. Thanks !
Hello. Can you change the code to create installation directories if they do not exist (perhaps with $mkdir -p)?
I have a freedom domain. I want the domain to forward another domain but that other domain changes every month.
Is possible to automate the forwarding?
Greetings ... it is not possible to configure the freenom account and password in the freenom.conf file basically I have changed it several times and it does not read the mentioned file.
Ubuntu Server Focal 20.04
##########################
# CONFIGURATION SETTINGS #
##########################
##############
# Login data #
##############
# Set variables for email/password -OR- source a "secrets" file
# Examples:
# freenom_email="[email protected]" #My email here and not working
# freenom_passwd="xxxxxxxxxxx" # My Pass here and not working
# source "/home/${LOGNAME}/.secret/.freenom"
freenom_email="[email protected]" **Try here maybe and not work**
#freenom_passwd="passsnotwork"
Any suggestion I am doing something wrong I have been guided by what I read
Thankful & Greetings
regards!!
-u Update A record with current ip
add [-s] to update
add [-f] to force update on unchanged ip
hi, my script is running in another machine, so I want to update another ip to the dns record, not current ip. can you add some feature to help this?
like this ./freenom.sh -u xxx.tk -s www -f -4 -ip 111.222.333.444
any chance for a bit of help with setup?
all im getting is
Error: Login failed, incorrect details
i checked my details in config a hundred times, i though it might be because i use # in my pass so i changed it to not have any, but the issue hasn't been resolved
all i did was to clone and then make install, and edit config
altho make install gives me this: make: Nothing to be done for `install'. but it does set up all files as they do copy and services are created
cheers and sorry for the hassle
I suspect this is freenom and not your script, but any idea what this means?
[Wed Sep 18 06:06:53 EDT 2019] Start: Domain renewal
[Wed Sep 18 06:07:04 EDT 2019] These domain(s) were not renewed:
Cannot renew [domain redacted] ([id redacted]) until 2019-10-30
[Wed Sep 18 06:07:04 EDT 2019] Done
I mean, the meaning is obvious, but ever see it before or understand what the restriction is?
Hi,
When I tried to list the domains in VPS, but it failed to login. Same conf file works in my PC.
I am not sure is there any firewall blocked. I can curl https://my.freenom.com/dologin.php with 403 result (should be normal)
I turned on the debug mode and here is the output.
DEBUG: debug=1 c_exOpts=
DEBUG: conf scriptConf=./freenom.conf
Listing Domains and ID's...
DEBUG: args debug=1 c_exOpts=
DEBUG: args 1=-l 2= 3= 4= 5= 6= 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/home/opc/freenom-renew freenom_out_mask=freenom out_path=/home/opc/freenom-renew/freenom
DEBUG: opts/conf freenom_domain_name= freenom_domain_id= freenom_subdomain_name=
DEBUG: opts/conf freenom_static_ip=
DEBUG: action freenom_update_ip=0 freenom_update_force=0 freenom_update_manual=0 freenom_update_all=0
DEBUG: action freenom_list_records=0 freenom_list=1 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=0
DEBUG: logintoken cookie_file=/tmp/tmp.5LuETK6uqp
DEBUG: 13:16:39 logintoken curl clientarea token=0bfc8a028bfa1d1dec34af792c07c259153309fb (retry=1/3 http_code=200 errCount=0)
Error: Login failed, incorrect details
DEBUG: 13:16:44 func_cleanup cookie_file=/tmp/tmp.5LuETK6uqp
sample:
Error: config file not specfied, try "freenom.sh -h"
debian10
When i try to run:
freenom.sh -c /etc/freenom.conf -u example.com
It will return Error: invalid domain name "/etc/freenom.confexample.com"
.
I debugged the code and I think it occurs at line 130. That line should remove the -c arg
part from the arguments list. The sed
command misses the /
character to remove and therefore the entire -c
clause is not removed. However, when I add that /
character, it will recognize all arguments as one big -c arg
, which results in also removing -u arg
part.
I cannot seem to find a quickfix solution but to rewrite the argument parsing to something as used in this:
https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
I tried to update a part1.part2.domainname.tk. So my command is:
sudo bash freenom.sh -u domainname.tk -s www.cloud
But it won't add or update something...
Hi, the log file return "couldn't get current global ip address".
I disabled ipv6 and checked my ip on internet but i don't know why the script doesn't work ...
but if i set manually "current_ip" all works, someone have an answer ?
sudo freenom.sh -l
[sudo] password for user:
DEBUG: debug=1 c_exOpts=
DEBUG: conf scriptConf=/usr/local/etc/freenom.conf
Listing Domains and ID's...
DEBUG: args debug=1 c_exOpts=
DEBUG: args 1=-l 2= 3= 4= 5= 6= 7= 8= 9=
DEBUG: opts/conf freenom_out_dir=/var/log/freenom freenom_out_mask=freenom out_path=/var/log/freenom/freenomDEBUG: opts/conf freenom_domain_name= freenom_domain_id= freenom_subdomain_name=
DEBUG: opts/conf freenom_static_ip=
DEBUG: action freenom_update_ip=0 freenom_update_force=0 freenom_update_manual=0 freenom_update_all=0
DEBUG: action freenom_list_records=0 freenom_list=1 freenom_list_renewals=0
DEBUG: action freenom_renew_domain=0 freenom_renew_all=1
DEBUG: logintoken cookie_file=/tmp/tmp.2wefMlm3oA
DEBUG: 04:12:21 logintoken curl clientarea token=TokenChangedForSecurity (retry=1/3 http_code=200 errCount=0)
Error: Login failed, incorrect details
DEBUG: 04:12:23 func_cleanup cookie_file=/tmp/tmp.2wefMlm3oA
LOG:
[vie jun 18 16:32:56 CEST 2021] Start: Domain renewal
[vie jun 18 16:33:24 CEST 2021] These domain(s) were not renewed:
Cannot renew "domain.xx" (1076807386) until 2021-10-03
Cannot renew "domain.xx" (1055596500) until 2022-01-21
[vie jun 18 16:33:24 CEST 2021] These domain(s) failed to renew:
Cannot renew "domain.xx" (1045224491), renewal period not found
[vie jun 18 17:12:28 CEST 2021] Start: Domain renewal
[vie jun 18 17:12:32 CEST 2021] Error: Login failed, incorrect details
[vie jun 18 17:14:46 CEST 2021] Start: Domain renewal
[vie jun 18 17:14:51 CEST 2021] Error: Login failed, incorrect details
[vie jun 18 17:30:53 CEST 2021] Start: Domain renewal
[vie jun 18 17:30:57 CEST 2021] Error: Login failed, incorrect details
[sáb jun 19 04:12:19 CEST 2021] Start: Domain renewal
[sáb jun 19 04:12:23 CEST 2021] Error: Login failed, incorrect details
from this commit #d5c9a61
sample:
# /root/freenom-script/freenom.sh -c /root/freenom-script/freenom.conf -r -a
Error: config file not specfied, try "freenom.sh -h"
debian10
Please check https://github.com/luolongfei/freenom and https://github.com/maxisoft/Freenom-dns-updater for other features that may be missing from Freenom-Script, love your work to automate domain name maintenance.
$curl -6 -v https://checkip.amazonaws.com
* Couldn't resolve host 'checkip.amazonaws.com'
./freenom.sh: line 161: RANDOM%0: division by 0 (error token is "0")
renewDateOkay is local variable in func_renewDate and can't be accessed in func_renewDomain, so func_renewDomain will always be skipped.
After moving renewDateOkay out of func_renewDate and remove local, renew will work.
The script is not working for me.:
[Tue 26 Mar 20:45:19 GMT 2019] Update failed (hagamosunahuel.ga 1234567890)
[Tue 26 Mar 20:45:19 GMT 2019] Done - with errors
[Tue 26 Mar 21:52:21 GMT 2019] Start - Update IP
[Tue 26 Mar 21:52:52 GMT 2019] Update failed (mucierla.ga 1234567890)
[Tue 26 Mar 21:52:52 GMT 2019] Done - with errors
[Wed 27 Mar 00:33:20 GMT 2019] Start - Update IP
[Wed 27 Mar 00:33:46 GMT 2019] Update failed (homework-manager.ml 1234567890)
[Wed 27 Mar 00:33:46 GMT 2019] Done - with errors
thanks for your work! <3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.