install&Uninstall_letsencrypt

问答中心分类: OneinStackinstall&Uninstall_letsencrypt
探路者 asked 8 年 ago
pushd ${oneinstack_dir}/src
src_url=https://dl.eff.org/certbot-auto && Download_src
/bin/mv certbot-auto /usr/local/bin/
=》mv前的/bin能都去掉吗?
chmod +x /usr/local/bin/certbot-auto
certbot-auto -n
popd
if [ -e "/root/.local/share/letsencrypt/bin/letsencrypt" ] && certbot-auto -h | grep '\-\-standalone' > /dev/null ; then
echo; echo "${CSUCCESS}Let's Encrypt client installed successfully! ${CEND}"
else
echo; echo "${CFAILURE}Let's Encrypt client install failed, Please try again! ${CEND}"
fi
}
Uninstall_letsencrypt() {
rm -rf /usr/local/bin/cerbot-auto /etc/letsencrypt /var/log/letsencrypt
[ "${OS}" == "CentOS" ] && Cron_file=/var/spool/cron/root || Cron_file=/var/spool/cron/crontabs/root
sed -i '/certbot-auto/d' ${Cron_file}
echo; echo "${CMSG}Let's Encrypt client uninstall completed${CEND}";
=》删除的是否其实还有一个目录:/var/lib/letsencrypt,干净删除的话是否也应该删除这个目录啊!
 

1 Answers
oneinstack answered 8 年 ago
/bin 不建议删除,直接使用mv如果存在(certbot-auto)不会覆盖,而/bin/mv 可以直接覆盖
/var/lib/letsencrypt目录可以删除