acmesh-official / acme.sh

A pure Unix shell script implementing ACME client protocol
https://acme.sh
GNU General Public License v3.0
38.61k stars 4.91k forks source link

Solaris 10: Renew date calculaltions do not work #482

Open teschulz opened 7 years ago

teschulz commented 7 years ago

On Solaris 10 the renew date calculations do not work. The code causing the problem is:

_time() { date -u "+%s" }

But the Solaris 10 date program does not understand '+%s' returning just '%s' as output. As I have the gnu utilities installed, I just changed date to gdate. But that may not be an option for anyone else. Elsewhere in the code as part of _time2str you have:

Soaris

if _exists adb; then _t_s_a=$(echo "0t${1}=Y" | adb) echo "$_t_s_a" fi

Perhaps something inspired by that could work.

Neilpang commented 7 years ago

it also works for me.

root@solaris:~# date -u "+%s"
1482282047
root@solaris:~# 

I will check and fix it later.