mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
update service file use ssservice.
remove some wrong parameters.
This commit is contained in:
2
debian/shadowsocks-rust-local@.service
vendored
2
debian/shadowsocks-rust-local@.service
vendored
@@ -13,7 +13,7 @@ After=network.target
|
||||
Type=simple
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/bin/sslocal --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
ExecStart=/usr/bin/ssservice local --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
2
debian/shadowsocks-rust-server@.service
vendored
2
debian/shadowsocks-rust-server@.service
vendored
@@ -13,7 +13,7 @@ After=network.target
|
||||
Type=simple
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
ExecStart=/usr/bin/ssserver --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
ExecStart=/usr/bin/ssservice server --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
2
debian/shadowsocks-rust.default
vendored
2
debian/shadowsocks-rust.default
vendored
@@ -15,7 +15,7 @@ START=yes
|
||||
CONFFILE="/etc/shadowsocks-rust/config.json"
|
||||
|
||||
# Extra command line arguments
|
||||
DAEMON_ARGS="-u"
|
||||
DAEMON_ARGS="--log-without-time"
|
||||
|
||||
# User and group to run the server as
|
||||
USER=nobody
|
||||
|
||||
10
debian/shadowsocks-rust.init
vendored
10
debian/shadowsocks-rust.init
vendored
@@ -16,8 +16,8 @@
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC=shadowsocks-rust # Introduce a short description here
|
||||
NAME=shadowsocks-rust # Introduce the short server's name here
|
||||
DAEMON=/usr/bin/ssserver # Introduce the server's location here
|
||||
DAEMON_ARGS="-u --log-without-time" # Arguments to run the daemon with
|
||||
DAEMON=/usr/bin/ssservice # Introduce the server's location here
|
||||
DAEMON_ARGS="--log-without-time" # Arguments to run the daemon with
|
||||
PIDFILE=/var/run/$NAME/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
@@ -55,10 +55,8 @@ do_start()
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- \
|
||||
-c "$CONFFILE" -u -f $PIDFILE $DAEMON_ARGS \
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON server \
|
||||
-c "$CONFFILE" -f $PIDFILE $DAEMON_ARGS \
|
||||
|| return 2
|
||||
}
|
||||
|
||||
|
||||
1
debian/shadowsocks-rust.postinst
vendored
1
debian/shadowsocks-rust.postinst
vendored
@@ -21,6 +21,7 @@ pathfind() {
|
||||
case "$1" in
|
||||
configure|reconfigure)
|
||||
pathfind setcap && setcap \
|
||||
cap_net_bind_service+ep /usr/bin/ssservice \
|
||||
cap_net_bind_service+ep /usr/bin/sslocal \
|
||||
cap_net_bind_service+ep /usr/bin/ssserver
|
||||
if [ ! -f /etc/shadowsocks-rust/config.json ]; then
|
||||
|
||||
2
debian/shadowsocks-rust.service
vendored
2
debian/shadowsocks-rust.service
vendored
@@ -14,7 +14,7 @@ EnvironmentFile=/etc/default/shadowsocks-rust
|
||||
User=nobody
|
||||
Group=nogroup
|
||||
LimitNOFILE=32768
|
||||
ExecStart=/usr/bin/ssserver --log-without-time -c ${CONFFILE} ${DAEMON_ARGS}
|
||||
ExecStart=/usr/bin/ssservice server -c ${CONFFILE} ${DAEMON_ARGS}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user