Add uninstall confirm dialog
This commit is contained in:
parent
3eab56d528
commit
3f446c9b94
|
|
@ -163,6 +163,10 @@ function install(){
|
||||||
|
|
||||||
# Uninstall Shadowsocks-libev
|
# Uninstall Shadowsocks-libev
|
||||||
function uninstall_shadowsocks_libev(){
|
function uninstall_shadowsocks_libev(){
|
||||||
|
printf "Are you sure uninstall Shadowsocks-libev? (y/n) : "
|
||||||
|
read answer
|
||||||
|
printf "\n"
|
||||||
|
if [ "$answer" = "y" ]; then
|
||||||
NODE_PID=`ps -ef | grep -v grep | grep -v ps | grep -i '/usr/local/bin/ss-server' | awk '{print $2}'`
|
NODE_PID=`ps -ef | grep -v grep | grep -v ps | grep -i '/usr/local/bin/ss-server' | awk '{print $2}'`
|
||||||
if [ ! -z $NODE_PID ]; then
|
if [ ! -z $NODE_PID ]; then
|
||||||
for pid in $NODE_PID
|
for pid in $NODE_PID
|
||||||
|
|
@ -182,6 +186,9 @@ function uninstall_shadowsocks_libev(){
|
||||||
rm -f /usr/local/bin/ss-redir
|
rm -f /usr/local/bin/ss-redir
|
||||||
rm -f /usr/local/share/man/man8/shadowsocks.8
|
rm -f /usr/local/share/man/man8/shadowsocks.8
|
||||||
echo "Shadowsocks-libev uninstall success!"
|
echo "Shadowsocks-libev uninstall success!"
|
||||||
|
else
|
||||||
|
echo "uninstall cancelled, Nothing to do"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialization step
|
# Initialization step
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user