This commit is contained in:
Yuk1n0 2021-07-10 19:13:33 +08:00
parent 9a800fd3b2
commit 88c9b4336c
No known key found for this signature in database
GPG key ID: 19A0D6377E84BEE6

View file

@ -776,6 +776,7 @@ install_shadowsocks() {
config_firewall config_firewall
fi fi
install_main install_main
install_cleanup
} }
uninstall_shadowsocks_libev() { uninstall_shadowsocks_libev() {
@ -886,6 +887,7 @@ uninstall_shadowsocks() {
exit 1 exit 1
fi fi
fi fi
ldconfig
} }
upgrade_shadowsocks() { upgrade_shadowsocks() {
@ -900,13 +902,13 @@ upgrade_shadowsocks() {
echo echo
exit 1 exit 1
elif [ -f ${shadowsocks_libev_init} ]; then elif [ -f ${shadowsocks_libev_init} ]; then
if [ ! "$(command -v ss-local)" ]; then if [ ! "$(command -v ss-server)" ]; then
echo echo
echo -e "[${red}Error${plain}] Shadowsocks-libev not installed..." echo -e "[${red}Error${plain}] Shadowsocks-libev not installed..."
echo echo
exit 1 exit 1
else else
current_local_version=$(ss-local --help | grep shadowsocks | cut -d' ' -f2) current_local_version=$(ss-server --help | grep shadowsocks | cut -d' ' -f2)
fi fi
get_libev_ver get_libev_ver
current_libev_ver=$(echo ${libev_ver} | sed -e 's/^[a-zA-Z]//g') current_libev_ver=$(echo ${libev_ver} | sed -e 's/^[a-zA-Z]//g')
@ -919,6 +921,7 @@ upgrade_shadowsocks() {
exit 1 exit 1
fi fi
uninstall_shadowsocks_libev uninstall_shadowsocks_libev
ldconfig
if [ "${answer}" == "Y" ] || [ "${answer}" == "y" ]; then if [ "${answer}" == "Y" ] || [ "${answer}" == "y" ]; then
disable_selinux disable_selinux
selected=1 selected=1
@ -929,6 +932,7 @@ upgrade_shadowsocks() {
shadowsocksport=$(cat /etc/shadowsocks-libev/config.json | grep server_port | cut -d ',' -f1 | cut -d ':' -f2) shadowsocksport=$(cat /etc/shadowsocks-libev/config.json | grep server_port | cut -d ',' -f1 | cut -d ':' -f2)
shadowsockscipher=$(cat /etc/shadowsocks-libev/config.json | grep method | cut -d\" -f4) shadowsockscipher=$(cat /etc/shadowsocks-libev/config.json | grep method | cut -d\" -f4)
install_dependencies install_dependencies
config_shadowsocks
download_files download_files
install_shadowsocks_libev install_shadowsocks_libev
install_completed_libev install_completed_libev