zfs create ship/certs
export JAIL=cert export JAILHOSTNAME=cert export JAILDOMAIN=ahlawat.com export JAILIP=12 export JAILUSER=X export JAILUSERID=1000 export JAILUSERVNC=false /root/FreeBSD/jails/create.sh $JAIL $JAILHOSTNAME $JAILDOMAIN $JAILIP $JAILUSER $JAILUSERID $JAILUSERVNC iocage fstab -r $JAIL /mnt/ship/certs /mnt/certs nullfs ro 0 0 iocage fstab -a $JAIL /mnt/ship/certs /mnt/certs nullfs rw 0 0 iocage fstab -l $JAIL iocage exec $JAIL "pkg install -y curl" iocage exec $JAIL "curl https://get.acme.sh -o /tmp/get-acme.sh" iocage exec $JAIL "sh /tmp/get-acme.sh" iocage exec $JAIL "rm /tmp/get-acme.sh" //restore previous backup iocage exec $JAIL "cp /mnt/certs/secret/.acme.sh/account.conf /root/.acme.sh/" iocage exec $JAIL "cp -r /mnt/certs/secret/.acme.sh/ca /root/.acme.sh/" iocage exec $JAIL "cp -r /mnt/certs/secret/.acme.sh/ahlawat.com /root/.acme.sh/" iocage exec $JAIL "cp -r /mnt/certs/secret/.acme.sh/beyondbell.com /root/.acme.sh/" iocage exec $JAIL "cp -r /mnt/certs/secret/.acme.sh/diyit.org /root/.acme.sh/" iocage exec $JAIL "cp -r /mnt/certs/secret/.acme.sh/xflow.org /root/.acme.sh/" iocage exec $JAIL "sh /root/.acme.sh/acme.sh --renew-all" // iocage console cert # crontab -l 4 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null 8 0 * * * /usr/local/bin/curl --time-cond "/mnt/certs/cacert.pem" -o /mnt/certs/cacert.pem https://curl.se/ca/cacert.pem
// First time export NS1_Key="KEY" /root/.acme.sh/acme.sh --issue --home "/root/.acme.sh" --dns dns_nsone -d ahlawat.com -d *.ahlawat.com --challenge-alias xflow.org --fullchain-file /mnt/certs/fullchain.pem --key-file /mnt/certs/privkey.pem --reloadcmd "cat /mnt/certs/fullchain.pem /mnt/certs/privkey.pem > /mnt/certs/haproxy.pem; chmod 600 /mnt/certs/privkey.pem; cp /mnt/certs/privkey.pem /mnt/certs/privkeyr.pem; chmod 644 /mnt/certs/privkeyr.pem; cp -r /root/.acme.sh /mnt/config/" /root/.acme.sh/acme.sh --issue --home "/root/.acme.sh" --dns dns_nsone -d beyondbell.com -d *.beyondbell.com --challenge-alias xflow.org --fullchain-file /mnt/certs/bbfullchain.pem --key-file /mnt/certs/bbprivkey.pem --reloadcmd "cat /mnt/certs/bbfullchain.pem /mnt/certs/bbprivkey.pem > /mnt/certs/bbhaproxy.pem; chmod 600 /mnt/certs/bbprivkey.pem; cp /mnt/certs/bbprivkey.pem /mnt/certs/bbprivkeyr.pem; chmod 644 /mnt/certs/bbprivkeyr.pem; cp -r /root/.acme.sh /mnt/config/" /root/.acme.sh/acme.sh --issue --home "/root/.acme.sh" --dns dns_nsone -d diyit.org -d *.diyit.org --challenge-alias xflow.org --fullchain-file /mnt/certs/diyfullchain.pem --key-file /mnt/certs/diyprivkey.pem --reloadcmd "cat /mnt/certs/diyfullchain.pem /mnt/certs/diyprivkey.pem > /mnt/certs/diyhaproxy.pem; chmod 600 /mnt/certs/diyprivkey.pem; cp /mnt/certs/diyprivkey.pem /mnt/certs/diyprivkeyr.pem; chmod 644 /mnt/certs/diyprivkeyr.pem; cp -r /root/.acme.sh /mnt/config/" /root/.acme.sh/acme.sh --issue --home "/root/.acme.sh" --dns dns_nsone -d xflow.org -d *.xflow.org --challenge-alias xflow.org --fullchain-file /mnt/certs/xflowfullchain.pem --key-file /mnt/certs/xflowprivkey.pem --reloadcmd "cat /mnt/certs/xflowfullchain.pem /mnt/certs/xflowprivkey.pem > /mnt/certs/xflowhaproxy.pem; chmod 600 /mnt/certs/xflowprivkey.pem; cp /mnt/certs/xflowprivkey.pem /mnt/certs/xflowprivkeyr.pem; chmod 644 /mnt/certs/xflowprivkeyr.pem; cp -r /root/.acme.sh /mnt/config/" cp -r /root/.acme.sh /mnt/certs/secret/ // https://github.com/Neilpang/acme.sh/tree/master/dnsapi - using ns1 - nsone - https://my.nsone.net/#/zones https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode https://curl.haxx.se/docs/caextract.html