projects
/
webi-installers
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
shellcheck: bugfix releases
[webi-installers/.git]
/
vps-utils
/
cap-net-bind.sh
1
#!/bin/bash
2
3
{
4
set -e
5
set -u
6
7
my_bin="$1"
8
if [ -z "$(which $my_bin)" ]; then
9
echo "'$my_bin' not found"
10
exit 1
11
fi
12
my_sudo=""
13
if [ -n "$(command -v sudo)" ]; then
14
my_sudo=sudo
15
fi
16
$my_sudo setcap 'cap_net_bind_service=+ep' $(readlink -f $(which $my_bin))
17
}