Fail to check registration date and expiration date
Ninitage opened this issue · 2 comments
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 username=blabla@gmail.com (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.
Hi @Ninitage
I tested the timers on Debian using make install
. It uses /etc/systemd as thats where local/user unit files go while /lib/systemd is meant for (deb) packages (man systemd.unit
).
Timers are supposed to use timers.target. By default systemd should already have correct dependencies set in basic.target (and hence multi-user), so not sure why you had to use multi-user.target directly. Will check on Ubuntu.
The missing date only happens when you set the domain/id in the conf, but not when leaving it out (or using cli option). I must have broken it in a previous commit, will fix it in the next version.
Just checked on Ubuntu and indeed it only accepts unit files in /lib/systemd/system. There's no dir for systemd under /usr/local and /etc/systemd/system needs systemctl --user
. I'll change the installer and instructions.