chore(style): convert blocks into functions (see #325)
[webi-installers/.git] / vps-utils / install.sh
1 #!/bin/bash
2
3 function __init_vps_utils() {
4     set -e
5     set -u
6
7     rm -f "$HOME/.local/bin/myip" "$HOME/.local/bin/vps-myip" "$HOME/.local/bin/vps-addswap" "$HOME/.local/bin/cap-net-bind"
8     webi_download "$WEBI_HOST/packages/vps-utils/cap-net-bind.sh" "$HOME/.local/bin/cap-net-bind"
9     webi_download "$WEBI_HOST/packages/vps-utils/vps-addswap.sh" "$HOME/.local/bin/vps-addswap"
10     webi_download "$WEBI_HOST/packages/myip/myip.sh" "$HOME/.local/bin/myip"
11     ln -s "$HOME/.local/bin/myip" "$HOME/.local/bin/vps-myip"
12     chmod a+x "$HOME/.local/bin/cap-net-bind"
13     chmod a+x "$HOME/.local/bin/myip"
14     chmod a+x "$HOME/.local/bin/vps-"*
15 }
16
17 __init_vps_utils