summarylogtreecommitdiffstats
path: root/phantomsocks.install
blob: 441a7c1a41bf6bf7110345c6cde66dd07e5e0f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
do_setcap() {
  setcap cap_net_raw+ep $(realpath $(which phantomsocks))
}

un_setcap() {
  setcap cap_net_raw-ep $(realpath $(which phantomsocks))
}

post_install() {
  do_setcap
  echo 'start with command phantomsocks-init to automate get interface'
  echo 'and use config at "~/.config/phantomsocks/config.json"'
  echo 'the built-in systemd unit are also launch using it'
}

post_upgrade() {
  do_setcap
}

pre_remove() {
  un_setcap
}