Add cleanup
This commit is contained in:
parent
82db2bdca0
commit
a084463f13
|
|
@ -197,6 +197,7 @@ function install_ss(){
|
||||||
./configure && make && make install
|
./configure && make && make install
|
||||||
ldconfig
|
ldconfig
|
||||||
# Install ShadowsocksR
|
# Install ShadowsocksR
|
||||||
|
cd $cur_dir
|
||||||
unzip -q manyuser.zip
|
unzip -q manyuser.zip
|
||||||
mv shadowsocks-manyuser/shadowsocks /usr/local/
|
mv shadowsocks-manyuser/shadowsocks /usr/local/
|
||||||
if [ -f /usr/local/shadowsocks/server.py ]; then
|
if [ -f /usr/local/shadowsocks/server.py ]; then
|
||||||
|
|
@ -230,10 +231,20 @@ function install_ss(){
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
echo "Shadowsocks install failed! Please Email to Teddysun <i@teddysun.com> and contact."
|
echo "Shadowsocks install failed! Please Email to Teddysun <i@teddysun.com> and contact."
|
||||||
|
install_cleanup
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Install cleanup
|
||||||
|
function install_cleanup(){
|
||||||
|
cd $cur_dir
|
||||||
|
rm -f manyuser.zip
|
||||||
|
rm -f libsodium-1.0.8.tar.gz
|
||||||
|
rm -rf libsodium-1.0.8
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Uninstall ShadowsocksR
|
# Uninstall ShadowsocksR
|
||||||
function uninstall_shadowsocks(){
|
function uninstall_shadowsocks(){
|
||||||
printf "Are you sure uninstall ShadowsocksR? (y/n) "
|
printf "Are you sure uninstall ShadowsocksR? (y/n) "
|
||||||
|
|
@ -271,6 +282,7 @@ function install_shadowsocks(){
|
||||||
download_files
|
download_files
|
||||||
config_shadowsocks
|
config_shadowsocks
|
||||||
install_ss
|
install_ss
|
||||||
|
install_cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
# Initialization step
|
# Initialization step
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user