mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-24 22:21:40 +00:00
add _uninstallalias
This commit is contained in:
parent
aba5c634ae
commit
9aa3be7f9f
16
acme.sh
16
acme.sh
@ -3447,26 +3447,36 @@ uninstall() {
|
|||||||
fi
|
fi
|
||||||
_initpath
|
_initpath
|
||||||
|
|
||||||
|
_uninstallalias
|
||||||
|
|
||||||
|
rm -f $LE_WORKING_DIR/$PROJECT_ENTRY
|
||||||
|
_info "The keys and certs are in $LE_WORKING_DIR, you can remove them by yourself."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_uninstallalias() {
|
||||||
|
_initpath
|
||||||
|
|
||||||
_profile="$(_detect_profile)"
|
_profile="$(_detect_profile)"
|
||||||
if [ "$_profile" ] ; then
|
if [ "$_profile" ] ; then
|
||||||
|
_info "Uninstalling alias from: '$_profile'"
|
||||||
text="$(cat $_profile)"
|
text="$(cat $_profile)"
|
||||||
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.env\"$||" > "$_profile"
|
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.env\"$||" > "$_profile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_csh_profile="$HOME/.cshrc"
|
_csh_profile="$HOME/.cshrc"
|
||||||
if [ -f "$_csh_profile" ] ; then
|
if [ -f "$_csh_profile" ] ; then
|
||||||
|
_info "Uninstalling alias from: '$_csh_profile'"
|
||||||
text="$(cat $_csh_profile)"
|
text="$(cat $_csh_profile)"
|
||||||
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_csh_profile"
|
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_csh_profile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_tcsh_profile="$HOME/.tcshrc"
|
_tcsh_profile="$HOME/.tcshrc"
|
||||||
if [ -f "$_tcsh_profile" ] ; then
|
if [ -f "$_tcsh_profile" ] ; then
|
||||||
|
_info "Uninstalling alias from: '$_csh_profile'"
|
||||||
text="$(cat $_tcsh_profile)"
|
text="$(cat $_tcsh_profile)"
|
||||||
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_tcsh_profile"
|
echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_tcsh_profile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f $LE_WORKING_DIR/$PROJECT_ENTRY
|
|
||||||
_info "The keys and certs are in $LE_WORKING_DIR, you can remove them by yourself."
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user