Browse Source

Add capabilities for Debian Linux, so you can run ss-* as non-root.

pull/1034/head
Zhengjun Zhang 8 years ago
committed by Max Lv
parent
commit
363bf5735e
2 changed files with 9 additions and 0 deletions
  1. 2
      debian/control
  2. 7
      debian/shadowsocks-libev.postinst

2
debian/control

@ -69,6 +69,8 @@ Depends:
apg,
${misc:Depends},
${shlibs:Depends},
Suggests:
libcap2-bin
Description: lightweight and secure socks5 proxy
Shadowsocks-libev is a lightweight and secure socks5 proxy for
embedded devices and low end boxes.

7
debian/shadowsocks-libev.postinst

@ -2,6 +2,13 @@
set -e
if [ -f /sbin/setcap ]; then
setcap cap_net_bind_service+ep /usr/bin/ss-local 2>/dev/null
setcap cap_net_bind_service+ep /usr/bin/ss-server 2>/dev/null
setcap cap_net_bind_service+ep /usr/bin/ss-tunnel 2>/dev/null
setcap cap_net_bind_service+ep /usr/bin/ss-redir 2>/dev/null
fi
case "$1" in
configure|reconfigure)
if [ ! -f /etc/shadowsocks-libev/config.json ]; then

Loading…
Cancel
Save