diff --git a/shadowsocks-libev-debian.sh b/shadowsocks-libev-debian.sh index ec96faa..72f9779 100644 --- a/shadowsocks-libev-debian.sh +++ b/shadowsocks-libev-debian.sh @@ -164,8 +164,11 @@ function install(){ # Uninstall Shadowsocks-libev function uninstall_shadowsocks_libev(){ printf "Are you sure uninstall Shadowsocks-libev? (y/n) : " - read answer printf "\n" + read -p "(Default: n):" answer + if [ -z $answer ]; then + answer="n" + fi if [ "$answer" = "y" ]; then 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 diff --git a/shadowsocks-libev.sh b/shadowsocks-libev.sh index 557d5cc..414f8a0 100644 --- a/shadowsocks-libev.sh +++ b/shadowsocks-libev.sh @@ -178,8 +178,11 @@ function install(){ # Uninstall Shadowsocks-libev function uninstall_shadowsocks_libev(){ printf "Are you sure uninstall shadowsocks_libev? (y/n) : " - read answer printf "\n" + read -p "(Default: n):" answer + if [ -z $answer ]; then + answer="n" + fi if [ "$answer" = "y" ]; then ps -ef | grep -v grep | grep -v ps | grep -i "ss-server" > /dev/null 2>&1 if [ $? -eq 0 ]; then diff --git a/shadowsocks-nodejs.sh b/shadowsocks-nodejs.sh index f75f21b..11d8ebc 100644 --- a/shadowsocks-nodejs.sh +++ b/shadowsocks-nodejs.sh @@ -190,8 +190,11 @@ function install(){ # Uninstall Shadowsocks-nodejs function uninstall_shadowsocks_nodejs(){ printf "Are you sure uninstall Shadowsocks-nodejs? (y/n) : " - read answer printf "\n" + read -p "(Default: n):" answer + if [ -z $answer ]; then + answer="n" + fi if [ "$answer" = "y" ]; then NODE_PID=`ps -ef | grep -v grep | grep -v ps | grep -i '/usr/local/bin/ssserver' | awk '{print $2}'` if [ ! -z $NODE_PID ]; then diff --git a/shadowsocks.sh b/shadowsocks.sh index 9c639b7..f027dc3 100644 --- a/shadowsocks.sh +++ b/shadowsocks.sh @@ -173,9 +173,12 @@ function install(){ # Uninstall Shadowsocks function uninstall_shadowsocks(){ - printf "Are you sure uninstall Shadowsocks? (y/n) : " - read answer + printf "Are you sure uninstall Shadowsocks? (y/n) " printf "\n" + read -p "(Default: n):" answer + if [ -z $answer ]; then + answer="n" + fi if [ "$answer" = "y" ]; then NODE_PID=`ps -ef | grep -v grep | grep -v ps | grep -i '/usr/bin/python /usr/bin/ssserver' | awk '{print $2}'` if [ ! -z $NODE_PID ]; then