final touches
This commit is contained in:
41
uninstall.sh
41
uninstall.sh
@@ -22,11 +22,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Download the lib file
|
# Download the lib file
|
||||||
if ! curl -fSL https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/lib.sh -o lib.sh
|
#if ! curl -fSL https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/lib.sh -o lib.sh
|
||||||
then
|
#then
|
||||||
echo "Failed to download the lib.sh file. Please try again"
|
# echo "Failed to download the lib.sh file. Please try again"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
# shellcheck disable=2034,2059,2164
|
# shellcheck disable=2034,2059,2164
|
||||||
true
|
true
|
||||||
@@ -43,6 +43,15 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Switch for Certbot
|
||||||
|
if [ -d /etc/letsencrypt ]
|
||||||
|
then
|
||||||
|
CERTBOT_SWITCH=ON
|
||||||
|
else
|
||||||
|
CERTBOT_SWITCH=OFF
|
||||||
|
fi
|
||||||
|
|
||||||
# Uninstall Rustdesk Menu
|
# Uninstall Rustdesk Menu
|
||||||
choice=$(whiptail --title "$TITLE" --checklist \
|
choice=$(whiptail --title "$TITLE" --checklist \
|
||||||
"What do you want to uninstall?
|
"What do you want to uninstall?
|
||||||
@@ -52,7 +61,6 @@ $CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
|
|||||||
"nginxall" "(Removes *everything* releated to Nginx)" ON \
|
"nginxall" "(Removes *everything* releated to Nginx)" ON \
|
||||||
"wget" "(Removes wget linux package)" ON \
|
"wget" "(Removes wget linux package)" ON \
|
||||||
"unzip" "(Removes unzip linux package)" ON \
|
"unzip" "(Removes unzip linux package)" ON \
|
||||||
"tar" "(Removes tar linux package)" ON \
|
|
||||||
"whiptail" "(Removes whiptail linux package)" ON \
|
"whiptail" "(Removes whiptail linux package)" ON \
|
||||||
"dnsutils" "(Removes dnsutils linux package)" ON \
|
"dnsutils" "(Removes dnsutils linux package)" ON \
|
||||||
"bind-utils" "(Removes bind-utils linux package)" ON \
|
"bind-utils" "(Removes bind-utils linux package)" ON \
|
||||||
@@ -60,11 +68,11 @@ $CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
|
|||||||
"UFW" "(Removes UFW linux package plus rules)" ON \
|
"UFW" "(Removes UFW linux package plus rules)" ON \
|
||||||
"Rustdesk LOGs" "(Removes RustDesk log dir)" ON \
|
"Rustdesk LOGs" "(Removes RustDesk log dir)" ON \
|
||||||
"Rustdesk Server" "(Removes Rustdesk server + services)" ON \
|
"Rustdesk Server" "(Removes Rustdesk server + services)" ON \
|
||||||
"Certbot" "(Removes Certbot package plus Let's Encrypt)" ON 3>&1 1>&2 2>&3)
|
"Certbot" "(Removes Certbot package plus Let's Encrypt)" "$CERTBOT_SWITCH" 3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
*"curl"*)
|
*"curl"*)
|
||||||
REMOVECURL="yes"
|
REMOVE_CURL="yes"
|
||||||
;;&
|
;;&
|
||||||
*"nginxconf"*)
|
*"nginxconf"*)
|
||||||
REMOVE_NGINX_CONF="yes"
|
REMOVE_NGINX_CONF="yes"
|
||||||
@@ -78,9 +86,6 @@ case "$choice" in
|
|||||||
*"unzip"*)
|
*"unzip"*)
|
||||||
REMOVE_UNZIP="yes"
|
REMOVE_UNZIP="yes"
|
||||||
;;&
|
;;&
|
||||||
*"tar"*)
|
|
||||||
REMOVE_TAR="yes"
|
|
||||||
;;&
|
|
||||||
*"whiptail"*)
|
*"whiptail"*)
|
||||||
REMOVE_WHIPTAIL="yes"
|
REMOVE_WHIPTAIL="yes"
|
||||||
;;&
|
;;&
|
||||||
@@ -207,16 +212,6 @@ then
|
|||||||
purge_linux_package unzip
|
purge_linux_package unzip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$REMOVE_TAR" ]
|
|
||||||
then
|
|
||||||
purge_linux_package tar
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$REMOVE_WHIPTAIL" ]
|
|
||||||
then
|
|
||||||
purge_linux_package whiptail
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$REMOVE_DNSUTILS" ]
|
if [ -n "$REMOVE_DNSUTILS" ]
|
||||||
then
|
then
|
||||||
purge_linux_package dnsutils
|
purge_linux_package dnsutils
|
||||||
@@ -241,4 +236,8 @@ msg_box "Uninstallation complete!
|
|||||||
|
|
||||||
Please hit OK to remove the last file."
|
Please hit OK to remove the last file."
|
||||||
|
|
||||||
|
if [ -n "$REMOVE_WHIPTAIL" ]
|
||||||
|
then
|
||||||
|
purge_linux_package whiptail
|
||||||
|
fi
|
||||||
rm -f lib.sh
|
rm -f lib.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user