Skip to content

Commit

Permalink
Change ssserver to ssservice
Browse files Browse the repository at this point in the history
  • Loading branch information
loyess committed May 25, 2023
1 parent 584417a commit 8985858
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions install/shadowsocks_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ install_shadowsocks_libev(){
install_shadowsocks_rust(){
cd ${CUR_DIR}
tar xf ${shadowsocks_rust_file}.tar.xz
chmod +x sslocal ssserver ssurl ssmanager ssservice
mv sslocal ssserver ssurl ssmanager ssservice ${SHADOWSOCKS_RUST_INSTALL_PATH}
chmod +x ssservice
mv ssservice ${SHADOWSOCKS_RUST_INSTALL_PATH}
if [ $? -eq 0 ]; then
chmod +x ${SHADOWSOCKS_RUST_INIT}
local service_name=$(basename ${SHADOWSOCKS_RUST_INIT})
Expand Down
14 changes: 7 additions & 7 deletions service/shadowsocks-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
### END INIT INFO


if [ -f /usr/local/bin/ssserver ]; then
DAEMON=/usr/local/bin/ssserver
elif [ -f /usr/bin/ssserver ]; then
DAEMON=/usr/bin/ssserver
if [ -f /usr/local/bin/ssservice ]; then
DAEMON=/usr/local/bin/ssservice
elif [ -f /usr/bin/ssservice ]; then
DAEMON=/usr/bin/ssservice
fi
NAME=Shadowsocks-rust
CONF=/etc/shadowsocks/config.json
Expand All @@ -32,7 +32,7 @@ if [ ! -d "$(dirname ${LOG})" ]; then
fi

check_pid(){
get_pid=`ps -ef |grep -v grep | grep ssserver |awk '{print $2}'`
get_pid=`ps -ef |grep -v grep | grep ssservice |awk '{print $2}'`
}

check_pid
Expand Down Expand Up @@ -111,9 +111,9 @@ do_start() {
ulimit -n 51200
if $(grep -q 'nameserver' $CONF); then
get_config_args $CONF
nohup $DAEMON -c $CONF --dns $NameServer -vvv > $LOG 2>&1 &
nohup $DAEMON server -c $CONF --dns $NameServer -vvv > $LOG 2>&1 &
else
nohup $DAEMON -c $CONF -vvv > $LOG 2>&1 &
nohup $DAEMON server -c $CONF -vvv > $LOG 2>&1 &
fi
check_pid
echo $get_pid > $PID_FILE
Expand Down
6 changes: 3 additions & 3 deletions ss-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SHADOWSOCKS_LIBEV_INIT_ONLINE="${BASE_URL}/service/shadowsocks-libev.sh"

# shadowsocks-rust config and init
SHADOWSOCKS_RUST_INSTALL_PATH="/usr/local/bin"
SHADOWSOCKS_RUST_BIN_PATH="/usr/local/bin/ssserver"
SHADOWSOCKS_RUST_BIN_PATH="/usr/local/bin/ssservice"
SHADOWSOCKS_RUST_INIT="/etc/init.d/shadowsocks-rust"
SHADOWSOCKS_RUST_INIT_LOCAL="./service/shadowsocks-rust.sh"
SHADOWSOCKS_RUST_INIT_ONLINE="${BASE_URL}/service/shadowsocks-rust.sh"
Expand Down Expand Up @@ -295,7 +295,7 @@ status_init(){
elif [ -e "${SHADOWSOCKS_RUST_BIN_PATH}" ]; then
ssName="Shadowsocks-rust"
ssPath="${SHADOWSOCKS_RUST_BIN_PATH}"
ssPid=`ps -ef | grep -v grep | grep ssserver | awk '{print $2}'`
ssPid=`ps -ef | grep -v grep | grep ssservice | awk '{print $2}'`
elif [ -e "${GO_SHADOWSOCKS2_BIN_PATH}" ]; then
ssName="Go-shadowsocks2"
ssPath="${GO_SHADOWSOCKS2_BIN_PATH}"
Expand Down Expand Up @@ -1383,7 +1383,7 @@ install_cleanup(){
rm -rf "${shadowsocks_libev_file}" "${shadowsocks_libev_file}.tar.gz"

# ss-rust
rm -rf "${shadowsocks_rust_file}.tar.xz"
rm -rf "${shadowsocks_rust_file}.tar.xz" sslocal ssserver ssurl ssmanager

# v2ray-plugin
rm -rf "${v2ray_plugin_file}.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion utils/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ nginx_start(){

start_services(){
initd_file_start "ss-server" "${SHADOWSOCKS_LIBEV_INIT}"
initd_file_start "ssserver" "${SHADOWSOCKS_RUST_INIT}"
initd_file_start "ssservice" "${SHADOWSOCKS_RUST_INIT}"
initd_file_start "go-shadowsocks2" "${GO_SHADOWSOCKS2_INIT}"
initd_file_start "kcptun-server" "${KCPTUN_INIT}"
initd_file_start "ck-server" "${CLOAK_INIT}"
Expand Down
2 changes: 1 addition & 1 deletion utils/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ kill_process(){

stop_services(){
kill_process "ss-server" "shadowsocks-libev"
kill_process "ssserver" "shadowsocks-rust"
kill_process "ssservice" "shadowsocks-rust"
kill_process "go-shadowsocks2" "go-shadowsocks"
kill_process "v2ray-plugin" "v2ray-plugin"
kill_process "obfs-server" "simple-obfs"
Expand Down
2 changes: 1 addition & 1 deletion utils/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ shadowsocks_uninstall(){
elif check_sys packageManager apt; then
update-rc.d -f ${ss_service_name} remove
fi
elif [ "$(command -v ssserver)" ]; then
elif [ "$(command -v ssservice)" ]; then
# check Shadowsocks-rust status
${SHADOWSOCKS_RUST_INIT} status > /dev/null 2>&1
if [ $? -eq 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion utils/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ss_update_preparation(){
ssUpdateShFileName="shadowsocks_install.sh"
ssUpdateCalledFuncName="install_shadowsocks_rust"
ssLatestVersion=$(get_ss_version "${ssNameUpdate}")
ssCurrentVersion=$(ssserver -V | grep shadowsocks | cut -d\ -f2)
ssCurrentVersion=$(ssservice -V | grep shadowsocks | cut -d\ -f2)
elif [[ -e ${GO_SHADOWSOCKS2_BIN_PATH} ]]; then
ssNameUpdate="go-shadowsocks2"
ssUpdateDownloadMark="go-ss2"
Expand Down

0 comments on commit 8985858

Please sign in to comment.