mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
debian: fixup debian packaging build scripts (#1722)
* debian: fix up postinst bad substitution Fix up postinst bad substitution caused by Bash string manipulation in the Dash script. * debian: update compat file Fix up the warning caused by compatibility levels before 10 are deprecated. * debian: replace user nobody in systemd file with dynamicuser * debian: remove dependency on apg and pwgen in control file * debian: update shadowsocks-rust-server@.service Add `DynamicUser=yes` in shadowsocks-rust-server@.service * debian: update shadowsocks-rust-local@.service Add `DynamicUser=yes` in shadowsocks-rust-local@.service --------- Co-authored-by: mesher2024 <mesher2024@users.noreply.github.com>
This commit is contained in:
2
debian/compat
vendored
2
debian/compat
vendored
@@ -1 +1 @@
|
||||
9
|
||||
10
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -2,7 +2,7 @@ Source: shadowsocks-rust
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Y. T. Chung <zonyitoo@gmail.com>
|
||||
Build-Depends: debhelper (>=9), rustc, cargo, apg | pwgen, libcap2-bin [linux-any]
|
||||
Build-Depends: debhelper (>=9), rustc, cargo, libcap2-bin [linux-any]
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://github.com/shadowsocks/shadowsocks-rust
|
||||
|
||||
|
||||
1
debian/shadowsocks-rust-local@.service
vendored
1
debian/shadowsocks-rust-local@.service
vendored
@@ -13,6 +13,7 @@ After=network.target
|
||||
Type=simple
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
DynamicUser=yes
|
||||
ExecStart=/usr/bin/ssservice local --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
|
||||
[Install]
|
||||
|
||||
1
debian/shadowsocks-rust-server@.service
vendored
1
debian/shadowsocks-rust-server@.service
vendored
@@ -13,6 +13,7 @@ After=network.target
|
||||
Type=simple
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
DynamicUser=yes
|
||||
ExecStart=/usr/bin/ssservice server --log-without-time -c /etc/shadowsocks-rust/%i.json
|
||||
|
||||
[Install]
|
||||
|
||||
3
debian/shadowsocks-rust.postinst
vendored
3
debian/shadowsocks-rust.postinst
vendored
@@ -27,8 +27,7 @@ case "$1" in
|
||||
if [ ! -f /etc/shadowsocks-rust/config.json ]; then
|
||||
set +e
|
||||
passwd=$(/usr/bin/ssservice genkey -m "chacha20-ietf-poly1305")
|
||||
passwd="${passwd//+/\\+}"
|
||||
passwd="${passwd//\//\\/}"
|
||||
passwd=$(echo $passwd | sed "s/+/\\\\+/g" | sed "s/\\//\\\\\\//g")
|
||||
set -e
|
||||
mkdir -p /etc/shadowsocks-rust
|
||||
sed "s/barfoo/$passwd/" /usr/share/shadowsocks-rust/config.json \
|
||||
|
||||
3
debian/shadowsocks-rust.service
vendored
3
debian/shadowsocks-rust.service
vendored
@@ -11,8 +11,7 @@ After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/default/shadowsocks-rust
|
||||
User=nobody
|
||||
Group=nogroup
|
||||
DynamicUser=yes
|
||||
LimitNOFILE=32768
|
||||
ExecStart=/usr/bin/ssservice server -c ${CONFFILE} ${DAEMON_ARGS}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user